Annotation Type IsFloat


  • @Retention(RUNTIME)
    @Target(PARAMETER)
    public @interface IsFloat
    Validates that the field is a floating point number. Only needed if you want to customise the validation messages.
    Author:
    James Roper
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String fieldKey
      The key for formatting the field
      String key
      The key for the violation message
      String message
      Default message if the key isn't found
    • Field Detail

      • KEY

        static final String KEY
      • MESSAGE

        static final String MESSAGE
    • Element Detail

      • key

        String key
        The key for the violation message
        Returns:
        The key of the violation message
        Default:
        "validation.is.float.violation"
      • message

        String message
        Default message if the key isn't found
        Returns:
        The default message
        Default:
        "{0} must be a decimal number"
      • fieldKey

        String fieldKey
        The key for formatting the field
        Returns:
        The key
        Default:
        ""