2fd4c8f0 by yyx

1

1 parent eb66d52f
...@@ -25,12 +25,6 @@ const people = reactive({ ...@@ -25,12 +25,6 @@ const people = reactive({
25 message: languageFormat(language.value, "请输入证件号", "ID Numbe"), 25 message: languageFormat(language.value, "请输入证件号", "ID Numbe"),
26 }); 26 });
27 27
28 // 使用正则验证身份证号码格式
29 const idCardRegex =
30 /^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[\dXx]$/;
31 if (!idCardRegex.test(people.form.idCard) && language.value == 0)
32 return ElMessage({ type: "warning", message: "身份证号格式不正确" });
33
34 addViewPeople(people.form).then((res) => { 28 addViewPeople(people.form).then((res) => {
35 ElMessage({ 29 ElMessage({
36 type: "success", 30 type: "success",
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!