I am using Symfony2 and Fosuserbundle on my website. But I have a problem when I want to reset my password.
The lastname is required.
I didn't override the formtype or the controller, I just overrode the view like this on reset_content.html.twig
{% trans_default_domain 'FOSUserBundle' %}
<form action="{{ path('fos_user_resetting_reset', {'token': token}) }}" {{ form_enctype(form) }} method="POST" class="fos_user_resetting_reset">
{{ form_widget(form) }}
<div>
<input class="btn btn-success" type="submit" value="{{ 'resetting.reset.submit'|trans }}" />
</div>
</form>
What can I do to solve this problem ?
Thanks,
我发现了问题:我的用户实体中有一个布尔值属性断言notBlank,它导致该消息“需要姓氏”的问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.