org.hibernate.validator.constraints

## Annotation Type Range

-     @Documented
      @Constraint(validatedBy={})
      @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
      @Retention(value=RUNTIME)
      @Min(value=0L)
      @Max(value=9223372036854775807L)
      public @interface Range

  The annotated element has to be in the appropriate range. Apply on numeric values or string representation of the numeric value.
  Author:
    Hardy Ferentschik

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `Class<?>[]` | `groups`
    `long` | `max`
    `String` | `message`
    `long` | `min`
    `Class<? extends Payload>[]` | `payload`

- - ### Element Detail

    - #### min

          public abstract long min

      Default:
        0L

    - #### max

          public abstract long max

      Default:
        9223372036854775807L

    - #### message

          public abstract String message

      Default:
        "{org.hibernate.validator.constraints.Range.message}"

    - #### groups

          public abstract Class<?>[] groups

      Default:
        {}

    - #### payload

          public abstract Class<? extends Payload>[] payload

      Default:
        {}

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved