com.smartgwt.client.widgets.form.validator

## Class MaskValidator

- 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.MaskValidator

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers

      public class MaskValidator
      extends Validator

  Validate against a regular expression mask, specified as validator.mask. If validation is successful a transformation can also be specified via the validator.transformTo property. This should be set to a string in the standard format for string replacement via the native JavaScript replace() method.

- - ### 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 and Description
    `MaskValidator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getMask()` Return the mask.
    `java.lang.String` | `getTransformTo()` Return the transformTo.
    `void` | `setMask(java.lang.String mask)` Set the mask.
    `void` | `setTransformTo(java.lang.String transformTo)` Set the transformTo.

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

    - #### MaskValidator

          public MaskValidator()

  - ### Method Detail

    - #### setMask

          public void setMask(java.lang.String mask)

      Set the mask. Eg : ^\s*(1?)\s*\(?\s*(\d{3})\s*\)?\s*-?\s*(\d{3})\s*-?\s*(\d{4})\s*$
      Parameters:
        `mask` - the mask

    - #### getMask

          public java.lang.String getMask()

      Return the mask.
      Returns:
        the mask

    - #### setTransformTo

          public void setTransformTo(java.lang.String transformTo)

      Set the transformTo. Eg : $1($2) $3 - $4
      Parameters:
        `transformTo` - the transformTo

    - #### getTransformTo

          public java.lang.String getTransformTo()

      Return the transformTo.
      Returns:
        the transformTo