I'm working on a Symfony2.0 form with a text field. I use Annotation to validate the field. The field has the following validation:
* @Assert\MinLength(limit=2, message="At least two characters")
* @Assert\NotBlank()
* @Assert\Regex(
* pattern= "/\d/",
* match= false,
* message= "This text cannot contain numbers"
* )
Notice that the Regex assertion comes from here.
So, I expect that all the characters except the numbers can be used! However, When I put some special chars like "ò", the form is not validated and the error message "This text cannot contain numbers" is returned.
I checked the Regex string at http://www.regextester.com/ and seems to work right!
Any idea why that validation in Symfony2.0 works bad? Am I missing something?