I have 'addressClass' and 'shippingAddressClass'. ShippingAdress extends the address, and both confirm identity. EXCEPT "shippingAddress" is not valid when a PO Box is detected. Although the mailbox is the correct billing address, UPS does not send them.
Hypothetically, what is the best SF2 practice for checking Bird , which extends Animal ?
Should we duplicate the .yml we used to validate Animal ? Essentially giving us two fairly identical sections (see below). In this case, getters slightly different from Animal to Bird , but properties require fairly identical validation rules.
Acme\BlogBundle\Entity\Animal: properties: name: - NotBlank: ~ getters: isAnimal: - "True" Acme\BlogBundle\Entity\Bird: properties: name: - NotBlank: ~ getters: isAnimal: - "True" isBird - "True"
source share