public class NumericValidationBuilder extends ValidationBuilder<NumericValidator>
validators
Constructor and Description |
---|
NumericValidationBuilder(List<NumericValidator> validators) |
Modifier and Type | Method and Description |
---|---|
NumericValidationBuilder |
allowNull(boolean allow)
Will ignore validation if set to
true . |
NumericValidationBuilder |
greaterThan(double min)
Specify a lower bound for a value, not inclusive.
|
NumericValidationBuilder |
lessThan(double max)
Specify a upper bound for a value, not inclusive.
|
NumericValidationBuilder |
onlyInteger()
Will invalidate the value if it is not integer.
|
message
public NumericValidationBuilder(List<NumericValidator> validators)
public NumericValidationBuilder allowNull(boolean allow)
true
. Default is false
.allow
- set to true to ignore validation if value if null
.public NumericValidationBuilder onlyInteger()
public NumericValidationBuilder lessThan(double max)
max
- lower bound for numeric value.public NumericValidationBuilder greaterThan(double min)
min
- lower bound for numeric value.Copyright © 2020 JavaLite. All rights reserved.