Annotation Type ISBN


Checks that the annotated character sequence is a valid ISBN. The length of the number and the check digit are both verified.

The supported type is CharSequence. null is considered valid.

During validation all non ISBN characters are ignored. All digits and 'X' are considered to be valid ISBN characters. This is useful when validating ISBN with dashes separating parts of the number (ex. 978-161-729-045-9).

Since:
6.0.6
Author:
Marko Bekhta
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Defines several @ISBN annotations on the same element.
    static enum 
    Defines the ISBN length.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
     
     
    Class<? extends Payload>[]
     
     
  • Element Details

    • message

      String message
      Default:
      "{org.hibernate.validator.constraints.ISBN.message}"
    • groups

      Class<?>[] groups
      Default:
      {}
    • payload

      Class<? extends Payload>[] payload
      Default:
      {}
    • type

      ISBN.Type type
      Default:
      ISBN_13