code: @Override
    public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
      final String valueAsString;
      if (ignoreWhitspaces) {
        valueAsString =
            Objects.toString(pvalue, StringUtils.EMPTY).replaceAll("\\s+", StringUtils.EMPTY);
      } else {
        valueAsString = Objects.toString(pvalue, null);
      }
      if (StringUtils.isEmpty(valueAsString)) {
        // empty field is ok
        return true;
      }
      if (valueAsString.length() != BicValidator.BIC_LENGTH_MIN
          && valueAsString.length() != BicValidator.BIC_LENGTH_MAX) {
        // to short or to long, but it's handled by size validator!
        return true;
      }
      if (!valueAsString.matches(BicValidator.BIC_REGEX)) {
        // format is wrong!
        return false;
      }
      // final BicMapConstants BIC_MAP = CreateClass.create(BicMapConstants.class);
      return BIC_MAP.bics().containsKey(valueAsString) || BIC_MAP.bics()
          .containsKey(StringUtils.substring(valueAsString, 0, BicValidator.BIC_LENGTH_MIN));
    }
docs: {@inheritDoc} check if given string is a valid BIC.
  
  @see javax.validation.ConstraintValidator#isValid(java.lang.Object,
  javax.validation.ConstraintValidatorContext)