This project is archived and is in readonly mode.

#428 ✓resolved
Arian

Form.validator email does not validate correctly!

Reported by Arian | October 29th, 2010 @ 07:58 PM | in 1.3.1.1

'some@some..com' passes as valid email even as it is not and 'foo#bar@gmail.com' does not validate even tough it is valid. I suggest the following change:

from

/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i

to (some char escaping could go here):

/^[a-z0-9!#$%&'*+-/=?^_`{|}~]{1,64}@([a-z0-9\-]{1,63}\.)+[a-z]{2,4}$/i

reference from http://en.wikipedia.org/wiki/Email_address#Syntax

There should be another method that "makes sure" there is no double dot (..) in the email.

(Original ticket on github: http://github.com/mootools/mootools-more/issues#issue/105)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

Pages