Created
August 26, 2015 10:32
-
-
Save feyyazesat/aa6674271ce5174041ba to your computer and use it in GitHub Desktop.
validation annotation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @var string | |
* | |
* @ORM\Column(name="firstname", type="string", length=45, nullable=true) | |
* @Assert\Length( | |
* min = 2, | |
* max = 45, | |
* minMessage = "user.form.validation.firstname.min", | |
* maxMessage = "user.form.validation.firstname.max", | |
* groups = {"personal_info"} | |
* ) | |
* @Assert\NotBlank( | |
* message = "user.form.validation.firstname.blank", | |
* groups = {"personal_info"} | |
* ) | |
* @Assert\Regex( | |
* pattern="/^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð']+$/u", | |
* match=true, | |
* message="user.form.validation.firstname.regex", | |
* groups = {"personal_info"} | |
* ) | |
*/ | |
private $firstname; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment