The email rule validation problem, if the email has some white spaces

It seems the email rule validation doesn’t provide the trim function automatically.

If there is a little white space after the email or before the email, when the form submit, it will appear the error message “it’s not an email format”. The user need to remove the space, otherwise it can’t pass the validation

Uhm… yes? Actually that’s a good thing :lol:

You are free to modify CEmailValidator.pattern if you don’t like that.

http://www.yiiframework.com/forum/index.php?/topic/16432-how-to-trim-a-field-for-a-model/