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

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -