This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| Follow me on | |
| Instagram: https://www.instagram.com/supahfunk/ | |
| Dribbble: https://dribbble.com/supahfunk | |
| Twitter: https://twitter.com/supahfunk | |
| Codepen: https://codepen.io/supah/ | |
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 要求 文字框可以输入空格 但首尾空格不计入字数 | |
| (rule, value, callback) => { | |
| // value 不是undefined 也不是null | |
| if(value!=null) { | |
| let v = value.trim() | |
| if(v.length>50) { | |
| callback('XXX不能超过50字!') | |
| } else if(v<=0) { | |
| callback('XXX不能为空!') | |
| } else { |