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 |
convertNullIfEmpty()
Converts an empty string to null before validation.
|
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.public NumericValidationBuilder convertNullIfEmpty()
Copyright © 2019 JavaLite. All rights reserved.