Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly does Yii email's validator validate?

This is probably a silly question, but i could't figure it out. I have the following:

array('email', 'email','message'=>'The email isn´t correct'),

What would this validation validate exactly? That the input text contains '@' and a '.' ?

like image 385
Soph Avatar asked Dec 16 '22 10:12

Soph


1 Answers

The validator uses a regular expression to validate the email.

For the specific expression it uses, look at the source. You can then use an online tool like reFiddle to quickly check if the regex matches any particular input.

like image 196
Jon Avatar answered Jan 01 '23 15:01

Jon