code: @Override
    public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
      final String valueAsString = Objects.toString(pvalue, null);
      if (StringUtils.isEmpty(valueAsString)) {
        return true;
      }
      if (valueAsString.length() != ISBN10_LENGTH) {
        // ISBN10 size is wrong, but that's handled by size annotation
        return true;
      }
      // calculate and check checksum (ISBN10)
      return CHECK_ISBN.isValidISBN10(valueAsString);
    }
docs: {@inheritDoc} check if given string is a valid isbn.
  
  @see javax.validation.ConstraintValidator#isValid(java.lang.Object,
  javax.validation.ConstraintValidatorContext)