protected function createViolation($value, Constraint $constraint)
    {
        $this
            ->context
            ->buildViolation($constraint->message)
            ->setParameter('%filename%', $value)
            ->addViolation();
    }
protected function createViolation($value, Constraint $constraint)
    {
        $this
            ->context
            ->buildViolation($constraint->message)
            ->setParameter('%filename%', $value)
            ->addViolation();
    }
protected function createViolation ( $ value , Constraint $ constraint ) { $ this -> context -> buildViolation ( $ constraint -> message ) -> setParameter ( '%filename%' , $ value ) -> addViolation ( ) ; }
Create violation for validator

@param string $value
@param Constraint $constraint
Create violation for validator