| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public static function loadValidatorMetadata(ClassMetadata $metadata) |
||
| 21 | { |
||
| 22 | $metadata->addPropertyConstraints('tipoDocRel', [ |
||
| 23 | new Assert\NotBlank(), |
||
| 24 | new Assert\Length([ |
||
| 25 | 'min' => 2, |
||
| 26 | 'max' => 2, |
||
| 27 | ]), |
||
| 28 | ]); |
||
| 29 | $metadata->addPropertyConstraints('nroDocRel', [ |
||
| 30 | new Assert\NotBlank(), |
||
| 31 | new Assert\Length([ 'max' => 30]), |
||
| 32 | ]); |
||
| 33 | $metadata->addPropertyConstraints('total',[ |
||
| 34 | new Assert\NotBlank(), |
||
| 35 | new Assert\Type(['type' => 'numeric']), |
||
| 36 | ]); |
||
| 37 | $metadata->addPropertyConstraints('tipoDocEmisor', [ |
||
| 38 | new Assert\NotBlank(), |
||
| 39 | new Assert\Length(['max' => 1]), |
||
| 40 | ]); |
||
| 41 | $metadata->addPropertyConstraints('nroDocEmisor',[ |
||
| 42 | new Assert\NotBlank(), |
||
| 43 | new Assert\Length(['max' => 15]), |
||
| 44 | ]); |
||
| 45 | } |
||
| 46 | } |