Class NumericValidationBuilder

java.lang.Object
org.javalite.validation.ValidationBuilder<NumericValidator>
org.javalite.validation.NumericValidationBuilder

public class NumericValidationBuilder extends ValidationBuilder<NumericValidator>
Author:
Igor Polevoy
  • Constructor Details

  • Method Details

    • allowNull

      public NumericValidationBuilder allowNull(boolean allow)
      Will ignore validation if set to true. Default is false.
      Parameters:
      allow - set to true to ignore validation if value if null.
      Returns:
      NumericValidationBuilder
    • onlyInteger

      public NumericValidationBuilder onlyInteger()
      Will invalidate the value if it is not integer.
      Returns:
      NumericValidationBuilder.
    • lessThan

      public NumericValidationBuilder lessThan(double max)
      Specify a upper bound for a value, not inclusive.
      Parameters:
      max - lower bound for numeric value.
      Returns:
      NumericValidationBuilder.
    • greaterThan

      public NumericValidationBuilder greaterThan(double min)
      Specify a lower bound for a value, not inclusive.
      Parameters:
      min - lower bound for numeric value.
      Returns:
      NumericValidationBuilder.