validation.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
  5. <class name="Symfony\Component\Form\Field">
  6. <getter property="transformationSuccessful">
  7. <constraint name="AssertTrue">
  8. <option name="message">This value is invalid</option>
  9. </constraint>
  10. </getter>
  11. </class>
  12. <class name="Symfony\Component\Form\Form">
  13. <constraint name="Callback"><value>validateData</value></constraint>
  14. <property name="fields">
  15. <constraint name="Valid" />
  16. </property>
  17. <getter property="submittedWithExtraFields">
  18. <constraint name="AssertFalse">
  19. <option name="message">This form should not contain extra fields</option>
  20. </constraint>
  21. </getter>
  22. <getter property="postMaxSizeReached">
  23. <constraint name="AssertFalse">
  24. <option name="message">The uploaded file was too large. Please try to upload a smaller file</option>
  25. </constraint>
  26. </getter>
  27. <getter property="csrfTokenValid">
  28. <constraint name="AssertTrue">
  29. <option name="message">The CSRF token is invalid. Please try to resubmit the form</option>
  30. </constraint>
  31. </getter>
  32. </class>
  33. <class name="Symfony\Component\Form\RepeatedField">
  34. <getter property="firstEqualToSecond">
  35. <constraint name="True">
  36. <option name="message">The two values should be equal</option>
  37. </constraint>
  38. </getter>
  39. </class>
  40. <class name="Symfony\Component\Form\DateField">
  41. <getter property="partiallyFilled">
  42. <constraint name="False">
  43. <option name="message">The date is not fully selected</option>
  44. </constraint>
  45. </getter>
  46. <getter property="yearWithinRange">
  47. <constraint name="True">
  48. <option name="message">The year is invalid</option>
  49. </constraint>
  50. </getter>
  51. <getter property="monthWithinRange">
  52. <constraint name="True">
  53. <option name="message">The month is invalid</option>
  54. </constraint>
  55. </getter>
  56. <getter property="dayWithinRange">
  57. <constraint name="True">
  58. <option name="message">The day is invalid</option>
  59. </constraint>
  60. </getter>
  61. </class>
  62. <class name="Symfony\Component\Form\TimeField">
  63. <getter property="partiallyFilled">
  64. <constraint name="False">
  65. <option name="message">The time is not fully selected</option>
  66. </constraint>
  67. </getter>
  68. <getter property="hourWithinRange">
  69. <constraint name="True">
  70. <option name="message">The hour is invalid</option>
  71. </constraint>
  72. </getter>
  73. <getter property="minuteWithinRange">
  74. <constraint name="True">
  75. <option name="message">The minutes are invalid</option>
  76. </constraint>
  77. </getter>
  78. <getter property="secondWithinRange">
  79. <constraint name="True">
  80. <option name="message">The seconds are invalid</option>
  81. </constraint>
  82. </getter>
  83. </class>
  84. <class name="Symfony\Component\Form\FileField">
  85. <getter property="iniSizeExceeded">
  86. <constraint name="False">
  87. <option name="message">The file is too large. Please upload a smaller file</option>
  88. </constraint>
  89. </getter>
  90. <getter property="formSizeExceeded">
  91. <constraint name="False">
  92. <option name="message">The file is too large. Please upload a smaller file</option>
  93. </constraint>
  94. </getter>
  95. <getter property="uploadComplete">
  96. <constraint name="True">
  97. <option name="message">The file was only partially uploaded. Please try again</option>
  98. </constraint>
  99. </getter>
  100. </class>
  101. </constraint-mapping>