validation.xml 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?xml version="1.0" ?>
  2. <constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
  5. http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
  6. <class name="FOS\UserBundle\Model\User">
  7. <property name="username">
  8. <constraint name="NotBlank">
  9. <option name="message">fos_user.username.blank</option>
  10. <option name="groups">
  11. <value>Registration</value>
  12. <value>Profile</value>
  13. </option>
  14. </constraint>
  15. <constraint name="Length">
  16. <option name="min">2</option>
  17. <option name="minMessage">fos_user.username.short</option>
  18. <option name="max">255</option>
  19. <option name="maxMessage">fos_user.username.long</option>
  20. <option name="groups">
  21. <value>Registration</value>
  22. <value>Profile</value>
  23. </option>
  24. </constraint>
  25. </property>
  26. <property name="email">
  27. <constraint name="NotBlank">
  28. <option name="message">fos_user.email.blank</option>
  29. <option name="groups">
  30. <value>Registration</value>
  31. <value>Profile</value>
  32. </option>
  33. </constraint>
  34. <constraint name="Length">
  35. <option name="min">2</option>
  36. <option name="minMessage">fos_user.email.short</option>
  37. <option name="max">254</option>
  38. <option name="maxMessage">fos_user.email.long</option>
  39. <option name="groups">
  40. <value>Registration</value>
  41. <value>Profile</value>
  42. </option>
  43. </constraint>
  44. <constraint name="Email">
  45. <option name="message">fos_user.email.invalid</option>
  46. <option name="groups">
  47. <value>Registration</value>
  48. <value>Profile</value>
  49. </option>
  50. </constraint>
  51. </property>
  52. <property name="plainPassword">
  53. <constraint name="NotBlank">
  54. <option name="message">fos_user.password.blank</option>
  55. <option name="groups">Registration</option>
  56. </constraint>
  57. <constraint name="Length">
  58. <option name="min">2</option>
  59. <option name="minMessage">fos_user.password.short</option>
  60. <option name="groups">
  61. <value>Registration</value>
  62. <value>Profile</value>
  63. </option>
  64. </constraint>
  65. </property>
  66. </class>
  67. <class name="FOS\UserBundle\Form\Model\ChangePassword">
  68. <property name="new">
  69. <constraint name="NotBlank">
  70. <option name="message">fos_user.new_password.blank</option>
  71. <option name="groups">
  72. <value>ChangePassword</value>
  73. <value>ResetPassword</value>
  74. </option>
  75. </constraint>
  76. <constraint name="Length">
  77. <option name="min">2</option>
  78. <option name="minMessage">fos_user.new_password.short</option>
  79. <option name="groups">
  80. <value>ChangePassword</value>
  81. <value>ResetPassword</value>
  82. </option>
  83. </constraint>
  84. </property>
  85. </class>
  86. <class name="FOS\UserBundle\Model\Group">
  87. <property name="name">
  88. <constraint name="NotBlank">
  89. <option name="message">fos_user.group.blank</option>
  90. <option name="groups">Registration</option>
  91. </constraint>
  92. <constraint name="Length">
  93. <option name="min">2</option>
  94. <option name="minMessage">fos_user.group.short</option>
  95. <option name="max">255</option>
  96. <option name="maxMessage">fos_user.group.long</option>
  97. <option name="groups">Registration</option>
  98. </constraint>
  99. </property>
  100. </class>
  101. <!-- Propel classes. This should stay in sync with the Model classes -->
  102. <class name="FOS\UserBundle\Propel\User">
  103. <property name="username">
  104. <constraint name="NotBlank">
  105. <option name="message">fos_user.username.blank</option>
  106. <option name="groups">
  107. <value>Registration</value>
  108. <value>Profile</value>
  109. </option>
  110. </constraint>
  111. <constraint name="Length">
  112. <option name="min">2</option>
  113. <option name="minMessage">fos_user.username.short</option>
  114. <option name="max">255</option>
  115. <option name="maxMessage">fos_user.username.long</option>
  116. <option name="groups">
  117. <value>Registration</value>
  118. <value>Profile</value>
  119. </option>
  120. </constraint>
  121. </property>
  122. <property name="email">
  123. <constraint name="NotBlank">
  124. <option name="message">fos_user.email.blank</option>
  125. <option name="groups">
  126. <value>Registration</value>
  127. <value>Profile</value>
  128. </option>
  129. </constraint>
  130. <constraint name="Length">
  131. <option name="min">2</option>
  132. <option name="minMessage">fos_user.email.short</option>
  133. <option name="max">255</option>
  134. <option name="maxMessage">fos_user.email.long</option>
  135. <option name="groups">
  136. <value>Registration</value>
  137. <value>Profile</value>
  138. </option>
  139. </constraint>
  140. <constraint name="Email">
  141. <option name="message">fos_user.email.invalid</option>
  142. <option name="groups">
  143. <value>Registration</value>
  144. <value>Profile</value>
  145. </option>
  146. </constraint>
  147. </property>
  148. <property name="plainPassword">
  149. <constraint name="NotBlank">
  150. <option name="message">fos_user.password.blank</option>
  151. <option name="groups">Registration</option>
  152. </constraint>
  153. <constraint name="Length">
  154. <option name="min">2</option>
  155. <option name="minMessage">fos_user.password.short</option>
  156. <option name="groups">
  157. <value>Registration</value>
  158. <value>Profile</value>
  159. </option>
  160. </constraint>
  161. </property>
  162. </class>
  163. <class name="FOS\UserBundle\Propel\Group">
  164. <property name="name">
  165. <constraint name="NotBlank">
  166. <option name="message">fos_user.group.blank</option>
  167. <option name="groups">Registration</option>
  168. </constraint>
  169. <constraint name="Length">
  170. <option name="min">2</option>
  171. <option name="minMessage">fos_user.group.short</option>
  172. <option name="max">255</option>
  173. <option name="maxMessage">fos_user.group.long</option>
  174. <option name="groups">Registration</option>
  175. </constraint>
  176. </property>
  177. </class>
  178. </constraint-mapping>