Annotation Interface HvlNoWhitespace


@Target(FIELD) @Retention(RUNTIME) @Constraint(validatedBy=HvlNoWhitespaceValidator.class) @Documented public @interface HvlNoWhitespace
A validation annotation to ensure that a field does not contain any whitespace characters.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Returns the validation groups to which this constraint belongs.
    Returns the error message to be used when validation fails.
    Class<? extends javax.validation.Payload>[]
    Returns any additional payload objects associated with this constraint.
  • Element Details

    • message

      String message
      Returns the error message to be used when validation fails.
      Returns:
      the string
      Default:
      "Value cannot contain spaces."
    • groups

      Class<?>[] groups
      Returns the validation groups to which this constraint belongs.
      Returns:
      the class [ ]
      Default:
      {}
    • payload

      Class<? extends javax.validation.Payload>[] payload
      Returns any additional payload objects associated with this constraint.
      Returns:
      the class [ ]
      Default:
      {}