?<input?class="phoneNumTF"??@input="phoneNmVerification"?:value="phoneNm"?type="text"?placeholder="請輸入手機號"?maxlength="11">
?<input?class="codeNumTF"??@input="msgCodeNmVerification"?:value="msgCode"?type="text"?placeholder="請輸入驗證碼"?maxlength="6">
?<input?class="infoContent"?type="text"?@input="idNumberVerification"?:value="idNumber"?placeholder="請輸入您的有效身份證號碼"?maxlength="18">
<input?class="infoContent"?type="text"?@input="nameVerification"?:value="name"?placeholder="請輸入您的真實姓名"?maxlength="15">
methods:{
????????//手機號輸入校驗(只允許輸入數(shù)字)
????????phoneNmVerification(e){
????????????e.target.value=e.target.value.replace(/([^0-9])+/g,?'');
????????????this.phoneNm?=?e.target.value;
????????},
????????//驗證碼輸入校驗(只允許輸入數(shù)字)
????????msgCodeNmVerification(e){
????????????e.target.value=e.target.value.replace(/([^0-9])+/g,?'');
????????????this.msgCode?=?e.target.value;
????????},
?//身份證輸入校驗(只允許輸入數(shù)字和Xx)
????idNumberVerification(e){
??????e.target.value=e.target.value.replace(/([^0-9Xx])+/g,?'');
??????this.idNumber?=?e.target.value;
????},
????//姓名校驗(只允許輸入漢字和英文)
????nameVerification(e){
??????e.target.value=e.target.value.replace(/[^\u4e00-\u9fa5A-Za-z]/,?'');
??????this.name?=?e.target.value;
????},
}