Package org.javalite.validation
Class NumericValidationBuilder
java.lang.Object
org.javalite.validation.ValidationBuilder<NumericValidator>
org.javalite.validation.NumericValidationBuilder
- Author:
- Igor Polevoy
-
Field Summary
Fields inherited from class org.javalite.validation.ValidationBuilder
validators
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowNull(boolean allow)
Will ignore validation if set totrue
.greaterThan(double min)
Specify a lower bound for a value, not inclusive.lessThan(double max)
Specify a upper bound for a value, not inclusive.Will invalidate the value if it is not integer.Methods inherited from class org.javalite.validation.ValidationBuilder
message
-
Constructor Details
-
NumericValidationBuilder
-
-
Method Details
-
allowNull
Will ignore validation if set totrue
. Default isfalse
.- Parameters:
allow
- set to true to ignore validation if value ifnull
.- Returns:
- NumericValidationBuilder
-
onlyInteger
Will invalidate the value if it is not integer.- Returns:
- NumericValidationBuilder.
-
lessThan
Specify a upper bound for a value, not inclusive.- Parameters:
max
- lower bound for numeric value.- Returns:
- NumericValidationBuilder.
-
greaterThan
Specify a lower bound for a value, not inclusive.- Parameters:
min
- lower bound for numeric value.- Returns:
- NumericValidationBuilder.
-