Wijmo UI for the Web
validateMask Method
wijmo.input Namespace > IFormatValidateLib Interface : validateMask Method
The string value to validate.
The formatting string to use in validating the value.
For the full list of supported format keywords, see Mask Format Keywords.

Use this method to validate the specified value against the specified options and return a Boolean value. If the value cannot be parsed with the specified parameters, it returns false. To use this method, instead of wijmo.input.IFormatValidateLib.validateMask, use $.wijinputcore.validateMask. See example below for the correct usage.

Syntax
var instance; // Type: wijmo.input.IFormatValidateLib;
var returnValue; // Type: bool

// Parameters
var value; // Type:  string
var format; // Type:  string

returnValue = instance.validateMask(value, format);
function validateMask( 
   value : string,
   format : string
) : bool;

Parameters

value
The string value to validate.
format
The formatting string to use in validating the value.
For the full list of supported format keywords, see Mask Format Keywords.

Return Value

A bool indicating whether the string value is valid for the specified format.
Example
$.wijinputcore.validateMask("1234567", "999-9999");  // returns: false
See Also

Reference

IFormatValidateLib Interface