兩個
/**
* @Assert\Regex(
* pattern="/(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).{7,}/",
* message="Uw wachtwoord moet zeven tekens of langer zijn, minimaal één getal bevatten, een hoofletter en een kleine letter. "
*)
*/
protected $plainPassword;
而且
<property name="plainPassword">
<constraint name="NotBlank">
<option name="message">fos_user.password.blank</option>
<option name="groups">
<value>Registration</value>
<value>ResetPassword</value>
<value>ChangePassword</value>
</option>
</constraint>
<constraint name="Length">
<option name="min">2</option>
<option name="max">4096</option>
<option name="minMessage">fos_user.password.short</option>
<option name="groups">
<value>Registration</value>
<value>Profile</value>
<value>ResetPassword</value>
<value>ChangePassword</value>
</option>
</constraint>
</property>
威爾的工作。錯誤來自我很久以前做出的驗證器文件。這個驗證器有一個錯誤,這個錯誤是這個選項無效的原因。
通過添加「* groups = {」registration「}」我修復了錯誤。
如果你跟我一樣檢查同樣的錯誤檢查你的驗證文件的錯誤並修復它們。
您正在使用fosuserbundle? – ahmedbhs
是的,我似乎它仍然使用默認的FOSUserBundle密碼強度值 –
你談論改變密碼或通過郵件重新排序,你可以給我的網址! – ahmedbhs