File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed
Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 2525use Symfony \Component \Validator \Constraint ;
2626
2727/**
28- * @Annotation
29- * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
30- *
3128 * @author Raymond Schouten
3229 *
3330 * @since 2.3
3431 */
32+ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD )]
3533class Bsn extends Constraint
3634{
3735 public string $ message = 'This value is not a valid Dutch social security number (BSN). ' ;
Original file line number Diff line number Diff line change 2727use Symfony \Component \Validator \Exception \ConstraintDefinitionException ;
2828
2929/**
30- * @Annotation
31- * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
32- *
3330 * @author Raymond Schouten
3431 *
3532 * @since 2.3
3633 */
34+ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE )]
3735class Collection extends Constraint
3836{
3937 /** @var Constraint[] */
Original file line number Diff line number Diff line change 2525use Symfony \Component \Validator \Constraint ;
2626
2727/**
28- * @Annotation
29- * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
30- *
3128 * @author Raymond Schouten
3229 *
3330 * @since 2.3
3431 */
32+ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD )]
3533class Json extends Constraint
3634{
3735 public string $ message = 'This value is not valid JSON. ' ;
You can’t perform that action at this time.
0 commit comments