protocols ) ); if ( ! preg_match( $pattern, $value ) ) { $this->context->buildViolation( $constraint->message ) ->setParameter( '{{ name }}', wp_basename( $value ) ) ->setCode( ImageUrlConstraint::INVALID_URL_ERROR ) ->addViolation(); return; } } }