August 7th, 2002, 08: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, 11:45 AM
August 7th, 2002, 02:41 PM