mishamx / yii-user

Yii PHP Framework extension for registration and management users accounts.
http://yii-user.2mx.org/
186 stars 154 forks source link

login_or_email validatation pattern bug #90

Open shersuyarov opened 8 years ago

shersuyarov commented 8 years ago

yii-user/models/UserRecoveryForm.php

array('login_or_email', 'match', 'pattern' => '/^[A-Za-z0-9@.-\s,]+$/u','message' => UserModule::t("Incorrect symbols (A-z0-9)."))

It didn't work properly. I tried to give it string "test@test.test" and it fails. I changed it to

array('login_or_email', 'match', 'pattern' => '/^[A-Za-z0-9@.\-\s,]+$/u','message' => UserModule::t("Incorrect symbols (A-z0-9).")),

However i'm not sure is it right, but now it passes validation

shersuyarov commented 8 years ago

Also, i'he noticed, that in original case, it passes client validation, but on the server side it fails