Wijmo UI for the Web
validateText Method
wijmo.input Namespace > IFormatValidateLib Interface : validateText Method
The string value to validate.
The string value indicating the text format that is accepted. For more information about format keywords, please see Mask Format KeywordsText Format Keywords.
The shortest number of characters to accept.
The longest number of characters to accept.
Validate the string value according to the specified format string. This mehtod have the following two function prototype. boolean $.wijinputcore.validateText(string value, string format); boolean $.wijinputcore.validateText(string value, Number minLength, Number maxLength);
Syntax
var instance; // Type: wijmo.input.IFormatValidateLib;
var returnValue; // Type: bool

// Parameters
var value; // Type:  string
var format; // Type:  any
var minLength; // Type:  any
var maxLength; // Type:  any

returnValue = instance.validateText(value, format, minLength, maxLength);
function validateText( 
   value : string,
   format : any,
   minLength : any,
   maxLength : any
) : bool;

Parameters

value
The string value to validate.
format
The string value indicating the text format that is accepted. For more information about format keywords, please see Mask Format KeywordsText Format Keywords.
minLength
The shortest number of characters to accept.
maxLength
The longest number of characters to accept.

Return Value

Returns a Boolean value indicating whether the string date value is valid for the specified format or length range.
Example
$.wijinputcore.validateText("123", "9");   // returns: true
$.wijinputcore.validateText("あ山9", "Z");   // returns: true
$.wijinputcore.validateText("9999999", 4, 7);  //  returns: true
Remarks
For more information, see Validation Function Library.
See Also

Reference

IFormatValidateLib Interface