LengthRangeΒΆ

Checks if the length of the value of a field is between or equal the configured values.

Example Code:

validators {
  DefaultValidator {
    model = DefaultValidator
    config {
      fields {
        post-code.errorChecks {
          lengthRange {
            model = LengthRange
            lengthMax = 10
            lengthMin = 7
          }
        }
      }
    }
  }
}

Properties

lengthMax

Sets the max string length a field value can be.

Mandatory

False

Data Type

Integer

Default

0

lengthMin

Sets the min string length a field value must be.

Mandatory

False

Data Type

Integer

Default

0