constraint-mapping.yml 787 B

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