ninja.validation
Annotation Type NumberValue


@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface NumberValue

Validates that the value of a number meets certain parameters

Author:
James Roper

Optional Element Summary
 String fieldKey
          The key for formatting the field
 double max
          The maximum value of the field
 String maxKey
          The key max violation message
 String maxMessage
          Default message if max violation message isn't found
 double min
          The minimum value of the field
 String minKey
          The key min violation message
 String minMessage
          Default message if min violation message isn't found
 

max

public abstract double max
The maximum value of the field

Default:
1.7976931348623157E308

min

public abstract double min
The minimum value of the field

Default:
4.9E-324

maxKey

public abstract String maxKey
The key max violation message

Returns:
The key of the max violation message
Default:
"validation.number.max.violation"

maxMessage

public abstract String maxMessage
Default message if max violation message isn't found

Returns:
The default message
Default:
"{0} exceeds maximum value of {1}"

minKey

public abstract String minKey
The key min violation message

Returns:
The key of the min violation message
Default:
"validation.number.min.violation"

minMessage

public abstract String minMessage
Default message if min violation message isn't found

Returns:
The default message
Default:
"{0} is less than minimum value of {1}"

fieldKey

public abstract String fieldKey
The key for formatting the field

Returns:
The key
Default:
""


Copyright © 2012. All Rights Reserved.