123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <?xml version="1.0" ?>
- <constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
- http://symfony.com/schema/dic/services/constraint-mapping-1.0.xsd">
-
- <class name="FOS\UserBundle\Model\User">
-
- <constraint name="FOS\UserBundle\Validator\Unique">
- <option name="property">usernameCanonical</option>
- <option name="message">The username is already used</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
-
- <constraint name="FOS\UserBundle\Validator\Unique">
- <option name="property">emailCanonical</option>
- <option name="message">The email is already used</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
-
- <property name="username">
- <constraint name="NotBlank">
- <option name="message">Please enter a username</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
- <constraint name="MinLength">
- <option name="limit">6</option>
- <option name="message">The username is too short</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
- <constraint name="MaxLength">
- <option name="limit">32</option>
- <option name="message">The username is too long</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
- </property>
-
- <property name="email">
- <constraint name="NotBlank">
- <option name="message">Please enter an email</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
- <constraint name="MinLength">
- <option name="limit">2</option>
- <option name="message">The email is too short</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
- <constraint name="MaxLength">
- <option name="limit">255</option>
- <option name="message">The email is too long</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
- <constraint name="Email">
- <option name="message">The email is not valid</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
- </property>
-
- <property name="plainPassword">
- <constraint name="NotBlank">
- <option name="message">Please enter a password</option>
- <option name="groups">Registration</option>
- </constraint>
- <constraint name="MinLength">
- <option name="limit">2</option>
- <option name="message">The password is too short</option>
- <option name="groups">
- <value>Registration</value>
- <value>Profile</value>
- </option>
- </constraint>
- </property>
- </class>
-
- <class name="FOS\UserBundle\Form\Model\CheckPassword">
- <constraint name="FOS\UserBundle\Validator\Password">
- <option name="passwordProperty">current</option>
- <option name="userProperty">user</option>
- <option name="groups">
- <value>ChangePassword</value>
- <value>Profile</value>
- </option>
- </constraint>
- </class>
-
- <class name="FOS\UserBundle\Form\Model\ChangePassword">
- <property name="new">
- <constraint name="NotBlank">
- <option name="message">Please enter a new password</option>
- <option name="groups">ChangePassword</option>
- </constraint>
- <constraint name="MinLength">
- <option name="limit">2</option>
- <option name="message">The new password is too short</option>
- <option name="groups">ChangePassword</option>
- </constraint>
- </property>
- </class>
-
- <class name="FOS\UserBundle\Form\Model\ResetPassword">
- <property name="new">
- <constraint name="NotBlank">
- <option name="message">Please enter a new password</option>
- <option name="groups">ResetPassword</option>
- </constraint>
- <constraint name="MinLength">
- <option name="limit">2</option>
- <option name="message">The new password is too short</option>
- <option name="groups">ResetPassword</option>
- </constraint>
- </property>
- </class>
-
- <class name="FOS\UserBundle\Model\Group">
- <property name="name">
- <constraint name="NotBlank">
- <option name="message">Please enter a name</option>
- <option name="groups">Registration</option>
- </constraint>
- <constraint name="MinLength">
- <option name="limit">2</option>
- <option name="message">The name is too short</option>
- <option name="groups">Registration</option>
- </constraint>
- <constraint name="MaxLength">
- <option name="limit">255</option>
- <option name="message">The name is too long</option>
- <option name="groups">Registration</option>
- </constraint>
- </property>
- </class>
-
- </constraint-mapping>
|