Skip to content

Instantly share code, notes, and snippets.

@ignat-s
Created September 26, 2015 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ignat-s/09170db64544ed9a95b2 to your computer and use it in GitHub Desktop.
Save ignat-s/09170db64544ed9a95b2 to your computer and use it in GitHub Desktop.
Oro\Bundle\AddressBundle\Entity\AbstractAddress:
properties:
street:
- Length:
max: 500
groups: [custom_address]
street2:
- Length:
max: 500
groups: [custom_address]
city:
- Length:
max: 255
groups: [custom_address]
postalCode:
- Length:
max: 255
groups: [custom_address]
# country:
# - NotBlank:
# groups: [custom_address]
regionText:
- Length:
max: 255
groups: [custom_address]
firstName:
- Length:
max: 255
groups: [custom_address]
lastName:
- Length:
max: 255
groups: [custom_address]
namePrefix:
- Length:
max: 255
groups: [custom_address]
middleName:
- Length:
max: 255
groups: [custom_address]
nameSuffix:
- Length:
max: 255
groups: [custom_address]
label:
- Length:
max: 255
groups: [custom_address]
# Prevent required values for all child of AbstractAddress
Oro\Bundle\AddressBundle\Entity\Address:
properties:
# street:
# - NotBlank:
# groups: [custom_address]
# city:
# - NotBlank:
# groups: [custom_address]
# postalCode:
# - NotBlank:
# groups: [custom_address]
constraints:
- Callback:
methods: [isRegionValid]
groups: [custom_address]
Oro\Bundle\AddressBundle\Entity\AbstractEmail:
properties:
email:
- NotBlank:
groups: [custom_address]
- Email:
groups: [custom_address]
Oro\Bundle\AddressBundle\Entity\AbstractPhone:
properties:
phone:
- NotBlank:
groups: [custom_address]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment