Class StringCountValidator

All Implemented Interfaces:
HasHandlers

public class StringCountValidator extends Validator
Determine whether a string value contains some substring multiple times. The substring to check for is specified via validator.substring. The validator.operator property allows you to specify how to test the number of substring occurrances. Valid values for this property are ==, !=, <, <=, >, >=.The number of matches to check for is specified via validator.count.
  • Constructor Details

    • StringCountValidator

      public StringCountValidator()
  • Method Details

    • setSubstring

      public void setSubstring(String substring)
      Set the substring.
      Parameters:
      substring - the substring
    • getSubstring

      public String getSubstring()
      Return the substring.
      Returns:
      the substring
    • setOperator

      public void setOperator(String operator)
      Set the operator.
      Parameters:
      operator - the operator
    • getOperator

      public String getOperator()
      Return the operator.
      Returns:
      the operator
    • setCount

      public void setCount(int count)
      Set the count.
      Parameters:
      count - the count
    • getCount

      public int getCount()
      Return the count.
      Returns:
      the count