参考下方代码:
- var textLengthValidator = {
- type: "textLength",
- comparisonOperator: "greaterThan",
- ignoreBlank: false,
- value1: "0",
- inputTitle: '提示',
- inputMessage: '字符数必须>0',
- highlightStyle: {
- type: 'circle',
- color: "red",
- position: 'outsideRight',
- },
- };
- // 无效数据高亮
- spread.options.highlightInvalidData = true;
复制代码 完整代码请参考附件demo
|