constraint-mapping.yml 874 B

12345678910111213141516171819202122232425262728293031323334353637
  1. Symfony\Tests\Component\Validator\Fixtures\Entity:
  2. constraints:
  3. # Constraint without value
  4. - NotNull: ~
  5. # Custom constraint
  6. - Symfony\Tests\Component\Validator\Fixtures\ConstraintA: ~
  7. # Constraint with single value
  8. - Min: 3
  9. # Constraint with multiple values
  10. - Choice: [A, B]
  11. # Constraint with child constraints
  12. - All:
  13. - NotNull: ~
  14. - Min: 3
  15. # Option with child constraints
  16. - All:
  17. constraints:
  18. - NotNull: ~
  19. - Min: 3
  20. # Value with child constraints
  21. - Collection:
  22. fields:
  23. foo:
  24. - NotNull: ~
  25. - Min: 3
  26. bar:
  27. - Min: 5
  28. properties:
  29. firstName:
  30. # Constraint with options
  31. - Choice: { choices: [A, B], message: Must be one of %choices% }
  32. getters:
  33. lastName:
  34. - NotNull: ~