js正则表达式 禁止输入汉字
const validateChinese = (rule, value, callback) => { var regex = /[\u4e00-\u9fa5]/; console.log('testtest',regex.test(value),value); if (regex.test(value)) { return callback(this.$t("禁止输入汉字")); } else { callback(); } };
卷帝
const validateChinese = (rule, value, callback) => { var regex = /[\u4e00-\u9fa5]/; console.log('testtest',regex.test(value),value); if (regex.test(value)) { return callback(this.$t("禁止输入汉字")); } else { callback(); } };