1
0
Fork 0
forked from 0x2620/oxjs

fix form validation bug

This commit is contained in:
rlx 2011-11-02 17:27:20 +00:00
commit 4bb3196c03
3 changed files with 15 additions and 10 deletions

View file

@ -71,10 +71,9 @@ Ox.isValidEmail <f> Tests if a string is a valid e-mail address
> Ox.isValidEmail("foo@bar..com")
false
@*/
// fixme: rename to isEmail
Ox.isValidEmail = function(str) {
return !!/^[0-9A-Z\.\+\-_]+@(?:[0-9A-Z\-]+\.)+[A-Z]{2,6}$/i.test(str);
}
};
/*@
Ox.pad <f> Pad a string to a given length