angularjs - display errors when the username doesn't fit pattern -
i'm using symfony , want display errors when username doesn't fit pattern, how can that?
{{ form_widget(form.username, {'attr':{'pattern': '[a-za-z]*'} }) }}
try add assert property in entity class.
check out asserts : http://symfony.com/doc/current/validation.html
and 1 regex : http://symfony.com/doc/current/reference/constraints/regex.html
Comments
Post a Comment