Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
45 | public static function loadValidatorMetadata(ClassMetadata $metadata): void |
||
46 | { |
||
47 | $metadata->addPropertyConstraints('reference', [ |
||
48 | new Assert\Regex([ |
||
49 | 'pattern' => '/^[a-zA-Z0-9]*$/', |
||
50 | 'match' => true |
||
51 | ]), |
||
52 | new Assert\Length([ |
||
53 | 'min' => 1, |
||
54 | 'max' => 21 // 25 minus 'RF' prefix minus 2-digit check sum |
||
55 | ]), |
||
56 | new Assert\NotBlank() |
||
57 | ]); |
||
60 |