Class StringLengthConstraint

    • Constructor Detail

      • StringLengthConstraint

        public StringLengthConstraint()
    • Method Detail

      • getType

        public String getType()
        Returns the 'type' of the constraint, this is the identifier given to constraint in the configuration.
        Specified by:
        getType in interface Constraint
        Overrides:
        getType in class AbstractConstraint
        Returns:
        The type
      • getMinLength

        public int getMinLength()
        Returns:
        Returns the minimum number of characters allowed
      • setMinLength

        public void setMinLength​(int minLength)
        Set the minimum number of characters allowed. Valid values are in the range [0, Integer.MAX_VALUE].
        Parameters:
        minLength - the minimum numbers of characters allowed
      • getMaxLength

        public int getMaxLength()
        Returns:
        Returns the maximum number of characters allowed
      • setMaxLength

        public void setMaxLength​(int maxLength)
        Set the maximum number of characters allowed. Valid values are in the range [0, Integer.MAX_VALUE].
        Parameters:
        maxLength - the minimum numbers of characters allowed