js: data() { return { rules: { name: [ { reuired: true, message: '请输入名称' }, { validator: function (rule, value, callback) { if (value == '测试') { callback(new Error('名字不能是测试!')) } else { callback() } } } ] } } }
js: data() { return { rules: { name: [ { reuired: true, message: '请输入名称' }, { validator: function (rule, value, callback) { if (value == '测试') { callback(new Error('名字不能是测试!')) } else { callback() } } } ] } } }