You are here

constraint-mapping.yml in Zircon Profile 8

vendor/symfony/validator/Tests/Mapping/Loader/constraint-mapping.yml

File

vendor/symfony/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. # Callbacks
  13. - Callback: validateMe
  14. - Callback: validateMeStatic
  15. - Callback: [Symfony\Component\Validator\Tests\Fixtures\CallbackClass, callback]
  16. properties:
  17. firstName:
  18. # Constraint without value
  19. - NotNull: ~
  20. # Constraint with single value
  21. - Range:
  22. min: 3
  23. # Constraint with multiple values
  24. - Choice: [A, B]
  25. # Constraint with child constraints
  26. - All:
  27. - NotNull: ~
  28. - Range:
  29. min: 3
  30. # Option with child constraints
  31. - All:
  32. constraints:
  33. - NotNull: ~
  34. - Range:
  35. min: 3
  36. # Value with child constraints
  37. - Collection:
  38. fields:
  39. foo:
  40. - NotNull: ~
  41. - Range:
  42. min: 3
  43. bar:
  44. - Range:
  45. min: 5
  46. # Constraint with options
  47. - Choice: { choices: [A, B], message: Must be one of %choices% }
  48. dummy:
  49. getters:
  50. lastName:
  51. - NotNull: ~
  52. valid:
  53. - "IsTrue": ~
  54. permissions:
  55. - "IsTrue": ~
  56. Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity:
  57. group_sequence_provider: true