Let reg1=/^ [\ u4e00 - \ u9fa5A - Za - z] + $///
in both English and Chinese
Let checkChineseEng=(rule, the value, the callback)=& gt; {
If (value & amp; & ! Reg1. Test (value)) {
The callback (new Error (' only support Chinese and English))
} else {
The callback ()
}
}
Rules:
{required: true, the message: 'please enter the construction unit, the trigger:' blur '},
{the validator: checkChineseEng, trigger: 'blur'}
]
Why dared ask bosses will be prompted to, how to solve?
CodePudding user response:
? , "Leon" di, pronunciation is "ang", radical is meshOnline etc.
CodePudding user response:
Let checkChineseEng=(rule, the value, the callback)=& gt; {//in both English and ChineseIf (value & amp; & ! Reg1. Test (value)) {
The callback (new Error (' only support Chinese and English))
} else {
The callback ()
}
}
Missed it
CodePudding user response:
Regular pass the/^ [\ u3400 - \ u4db5A - Za - z] + $/CodePudding user response: