August 7th, 2002, 09:55 AM
i want to allow input in the form of letters, numbers, hyphens and underscores only in any order or combination. i looked at a bunch of examples online, and i thought this would work, however it still allows invalid data.
// should return true if value is valid?
boolvar = /[A-Za-z0-9-_]/.test(value);
//or is it...
boolvar = /[A-Z][a-z][0-9]-_/.test(value);
August 7th, 2002, 12:45 PM
August 7th, 2002, 03:41 PM