Hello, all!
I need to create TextItem with mask and with validation of value according this mask. Documentation say that for mask input I can use method setMask().
It is logical to think that TextItem with filled setMask() should validate value according this mask. But it just "input mask" and user can fill value only partly and TextItem don't show error in this case.
Certainly I can use validators for it (MaskValidator, RegExpValidator) and method setValidators(). But syntax of TextItem.setMask() and of these validators are diffrerent: for setMask() SmartGWT uses own syntax, for validators - standard RegExp.
This means that I have to work twice: write the format of the input mask and separately write a regular expression to value validation.
My question is: is it exists more easy way to use "input mask" and strictly validate values according it ?
Best regards,
Eugeny
I need to create TextItem with mask and with validation of value according this mask. Documentation say that for mask input I can use method setMask().
It is logical to think that TextItem with filled setMask() should validate value according this mask. But it just "input mask" and user can fill value only partly and TextItem don't show error in this case.
Certainly I can use validators for it (MaskValidator, RegExpValidator) and method setValidators(). But syntax of TextItem.setMask() and of these validators are diffrerent: for setMask() SmartGWT uses own syntax, for validators - standard RegExp.
This means that I have to work twice: write the format of the input mask and separately write a regular expression to value validation.
My question is: is it exists more easy way to use "input mask" and strictly validate values according it ?
Best regards,
Eugeny
Comment