constraint-mapping.yml

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.yml

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Mapping/Loader/constraint-mapping.yml
View source
  1. namespaces:
  2. custom: Symfony\Component\Validator\Tests\Fixtures\
  3. Symfony\Component\Validator\Tests\Fixtures\Entity:
  4. group_sequence:
  5. - Foo
  6. - Entity
  7. constraints:
  8. # Custom constraint
  9. - Symfony\Component\Validator\Tests\Fixtures\ConstraintA: ~
  10. # Custom constraint with namespaces prefix
  11. - "custom:ConstraintB": ~
  12. properties:
  13. firstName:
  14. # Constraint without value
  15. - NotNull: ~
  16. # Constraint with single value
  17. - Range:
  18. min: 3
  19. # Constraint with multiple values
  20. - Choice: [A, B]
  21. # Constraint with child constraints
  22. - All:
  23. - NotNull: ~
  24. - Range:
  25. min: 3
  26. # Option with child constraints
  27. - All:
  28. constraints:
  29. - NotNull: ~
  30. - Range:
  31. min: 3
  32. # Value with child constraints
  33. - Collection:
  34. fields:
  35. foo:
  36. - NotNull: ~
  37. - Range:
  38. min: 3
  39. bar:
  40. - Range:
  41. min: 5
  42. # Constraint with options
  43. - Choice: { choices: [A, B], message: Must be one of %choices% }
  44. dummy:
  45. getters:
  46. lastName:
  47. - NotNull: ~
  48. Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity:
  49. group_sequence_provider: true