validation.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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="max">4096</option>
  60. <option name="minMessage">fos_user.password.short</option>
  61. <option name="groups">
  62. <value>Registration</value>
  63. <value>Profile</value>
  64. </option>
  65. </constraint>
  66. </property>
  67. </class>
  68. <class name="FOS\UserBundle\Form\Model\ChangePassword">
  69. <property name="new">
  70. <constraint name="NotBlank">
  71. <option name="message">fos_user.new_password.blank</option>
  72. <option name="groups">
  73. <value>ChangePassword</value>
  74. <value>ResetPassword</value>
  75. </option>
  76. </constraint>
  77. <constraint name="Length">
  78. <option name="min">2</option>
  79. <option name="max">4096</option>
  80. <option name="minMessage">fos_user.new_password.short</option>
  81. <option name="groups">
  82. <value>ChangePassword</value>
  83. <value>ResetPassword</value>
  84. </option>
  85. </constraint>
  86. </property>
  87. </class>
  88. <class name="FOS\UserBundle\Model\Group">
  89. <property name="name">
  90. <constraint name="NotBlank">
  91. <option name="message">fos_user.group.blank</option>
  92. <option name="groups">Registration</option>
  93. </constraint>
  94. <constraint name="Length">
  95. <option name="min">2</option>
  96. <option name="minMessage">fos_user.group.short</option>
  97. <option name="max">255</option>
  98. <option name="maxMessage">fos_user.group.long</option>
  99. <option name="groups">Registration</option>
  100. </constraint>
  101. </property>
  102. </class>
  103. <!-- Propel classes. This should stay in sync with the Model classes -->
  104. <class name="FOS\UserBundle\Propel\User">
  105. <property name="username">
  106. <constraint name="NotBlank">
  107. <option name="message">fos_user.username.blank</option>
  108. <option name="groups">
  109. <value>Registration</value>
  110. <value>Profile</value>
  111. </option>
  112. </constraint>
  113. <constraint name="Length">
  114. <option name="min">2</option>
  115. <option name="minMessage">fos_user.username.short</option>
  116. <option name="max">255</option>
  117. <option name="maxMessage">fos_user.username.long</option>
  118. <option name="groups">
  119. <value>Registration</value>
  120. <value>Profile</value>
  121. </option>
  122. </constraint>
  123. </property>
  124. <property name="email">
  125. <constraint name="NotBlank">
  126. <option name="message">fos_user.email.blank</option>
  127. <option name="groups">
  128. <value>Registration</value>
  129. <value>Profile</value>
  130. </option>
  131. </constraint>
  132. <constraint name="Length">
  133. <option name="min">2</option>
  134. <option name="minMessage">fos_user.email.short</option>
  135. <option name="max">255</option>
  136. <option name="maxMessage">fos_user.email.long</option>
  137. <option name="groups">
  138. <value>Registration</value>
  139. <value>Profile</value>
  140. </option>
  141. </constraint>
  142. <constraint name="Email">
  143. <option name="message">fos_user.email.invalid</option>
  144. <option name="groups">
  145. <value>Registration</value>
  146. <value>Profile</value>
  147. </option>
  148. </constraint>
  149. </property>
  150. <property name="plainPassword">
  151. <constraint name="NotBlank">
  152. <option name="message">fos_user.password.blank</option>
  153. <option name="groups">Registration</option>
  154. </constraint>
  155. <constraint name="Length">
  156. <option name="min">2</option>
  157. <option name="max">4096</option>
  158. <option name="minMessage">fos_user.password.short</option>
  159. <option name="groups">
  160. <value>Registration</value>
  161. <value>Profile</value>
  162. </option>
  163. </constraint>
  164. </property>
  165. </class>
  166. <class name="FOS\UserBundle\Propel\Group">
  167. <property name="name">
  168. <constraint name="NotBlank">
  169. <option name="message">fos_user.group.blank</option>
  170. <option name="groups">Registration</option>
  171. </constraint>
  172. <constraint name="Length">
  173. <option name="min">2</option>
  174. <option name="minMessage">fos_user.group.short</option>
  175. <option name="max">255</option>
  176. <option name="maxMessage">fos_user.group.long</option>
  177. <option name="groups">Registration</option>
  178. </constraint>
  179. </property>
  180. </class>
  181. </constraint-mapping>