forked from 0x2620/oxjs
fix form validation bug
This commit is contained in:
parent
be4d7c9124
commit
4bb3196c03
3 changed files with 15 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue