@@ -144,8 +144,6 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
* @var int
*
* @ORM\Column(type="integer", nullable=false, options={"default": "0"})
- *
- * @Assert\Callback({"FTTHBundle\Validator\ONUPositionValidator", "validate"})
*/
private $position = 0;
@@ -1,27 +0,0 @@
-<?php
-
-namespace FTTHBundle\Validator;
-use Symfony\Component\Validator\Context\ExecutionContextInterface;
-use FTTHBundle\Entity\NAP;
-class ONUPositionValidator
-{
- /**
- * @param int $value
- * @param ExecutionContextInterface $context
- * @param array $payload
- */
- public static function validate($value, ExecutionContextInterface $context, $payload)
- {
- if ($value == 0) {
- $value = $context->getObject()->getNewPosition();
- }
- if ($value > NAP::MAX_NUMBER_ONU) {
- $context->buildViolation('error.max_number_onu_invalid')
- ->addViolation();
-}