Commit d436f924 by 李嘉林

身份证号支持输入英文数字

parent 1612b8bf
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<div class="text"> <div class="text">
<input <input
type="text" type="text"
maxlength="18" maxlength="255"
class="ipt" class="ipt"
placeholder="请输入身份证号码" placeholder="请输入身份证号码"
@input="input_id_number" @input="input_id_number"
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
}); });
}, },
input_id_number() { input_id_number() {
let n = this.idNum.match(/\d{0,17}(\d|x)/i); let n = this.idNum.match(/[0-9a-z]{0,255}/i);
this.idNum = n === null ? "" : n[0]; this.idNum = n === null ? "" : n[0];
// if (this.idNum.length == 18) { // if (this.idNum.length == 18) {
// this.check_id_number(); // this.check_id_number();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment