Created
July 11, 2017 11:10
-
-
Save haltsir/db1661ef1c672a2b7d81b002952d01fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function loadValidatorMetadata(ClassMetadata $metadata) | |
{ | |
$metadata->addPropertyConstraint('images', new Assert\Callback( | |
[ | |
'callback' => [static::class, 'validateImage'], | |
'groups' => ['product_product_images'] | |
] | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment