SpreadJS Documentation
createTextLengthValidator Method
The type of ComparisonOperator compare operator.
The first object.
The second object.
Creates a validator based on text length.
Syntax
var value; // Type: DefaultDataValidator
value = GcSpread.Sheets.DefaultDataValidator.createTextLengthValidator(typeOperator, v1, v2);
function createTextLengthValidator( 
   typeOperator : ComparisonOperator,
   v1 : object,
   v2 : object
) : DefaultDataValidator;

Parameters

typeOperator
The type of ComparisonOperator compare operator.
v1
The first object.
v2
The second object.

Return Value

The validator.
Example
This example creates a text length validator.
spread.highlightInvalidData(true);
var dv = GcSpread.Sheets.DefaultDataValidator.createTextLengthValidator(GcSpread.Sheets.ComparisonOperator.GreaterThan, "4", "20");
dv.showInputMessage = true;
dv.inputMessage = "Number of characters must be greater than 4.";
dv.inputTitle = "tip";
activeSheet.setDataValidator(1, 1, dv)
See Also

Reference

DefaultDataValidator type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.