Package com.smartgwt.client.widgets.form.validator

# Class StringCountValidator

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.widgets.form.validator.Validator
com.smartgwt.client.widgets.form.validator.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.

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.DataClass

  `factoryCreated, factoryProperties`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StringCountValidator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getCount()`
  Return the count.
  `String`
  `getOperator()`
  Return the operator.
  `String`
  `getSubstring()`
  Return the substring.
  `void`
  `setCount(int count)`
  Set the count.
  `void`
  `setOperator(String operator)`
  Set the operator.
  `void`
  `setSubstring(String substring)`
  Set the substring.

  ### Methods inherited from class com.smartgwt.client.widgets.form.validator.Validator

  `addValidatorDefinition, create, getApplyWhen, getCheckComponentData, getClientOnly, getCondition, getDependentFields, getOrCreateRef, getStopIfFalse, getStopOnError, getType, getTypeAsString, getValidateOnChange, setApplyWhen, setCheckComponentData, setClientOnly, setCondition, setDependentFields, setErrorMessage, setStopIfFalse, setStopOnError, setType, setType, setValidateOnChange`

  ### Methods inherited from class com.smartgwt.client.core.DataClass

  `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## 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