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
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 SummaryFields inherited from class com.smartgwt.client.core.DataClassfactoryCreated, factoryProperties
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintgetCount()Return the count.Return the operator.Return the substring.voidsetCount(int count) Set the count.voidsetOperator(String operator) Set the operator.voidsetSubstring(String substring) Set the substring.Methods inherited from class com.smartgwt.client.widgets.form.validator.ValidatoraddValidatorDefinition, create, getApplyWhen, getCheckComponentData, getClientOnly, getCondition, getDependentFields, getOrCreateRef, getStopIfFalse, getStopOnError, getType, getTypeAsString, getValidateOnChange, setApplyWhen, setCheckComponentData, setClientOnly, setCondition, setDependentFields, setErrorMessage, setStopIfFalse, setStopOnError, setType, setType, setValidateOnChangeMethods inherited from class com.smartgwt.client.core.DataClassapplyFactoryProperties, 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
- 
Constructor Details- 
StringCountValidatorpublic StringCountValidator()
 
- 
- 
Method Details- 
setSubstringSet the substring.- Parameters:
- substring- the substring
 
- 
getSubstringReturn the substring.- Returns:
- the substring
 
- 
setOperatorSet the operator.- Parameters:
- operator- the operator
 
- 
getOperatorReturn the operator.- Returns:
- the operator
 
- 
setCountpublic void setCount(int count) Set the count.- Parameters:
- count- the count
 
- 
getCountpublic int getCount()Return the count.- Returns:
- the count
 
 
-