// the bic must be either 8 or 11 characters long
if(!\in_array(\strlen($canonicalize), [8, 11])){ $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Bic::INVALID_LENGTH_ERROR) ->addViolation();
return; }
// must contain alphanumeric values only
if(!ctype_alnum($canonicalize)){ $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->setCode(Bic::INVALID_CHARACTERS_ERROR)