เลขบัตร กับ เบอร์ limit type เป็น int อย่างเดียว

แก้ไขสามารถบันทึก แก้ไขข้อมูลได้ เลขบัตร กับ เบอร์ limit typt เป็น int อย่างเดียวแล้ว
This commit is contained in:
AnandaTon 2023-03-29 14:33:05 +07:00
parent b5c6c83d62
commit db2ee3d01e
3 changed files with 12 additions and 6 deletions

View file

@ -153,6 +153,7 @@
:class="getClass(status == 'register' || status == 'rejectRegister')"
:outlined="status == 'register' || status == 'rejectRegister'"
dense
type="tel"
counter
lazy-rules
:readonly="!(status == 'register' || status == 'rejectRegister')"
@ -161,7 +162,7 @@
maxlength="13"
:rules="[
(val) => !!val || `${'กรุณากรอก เลขบัตรประจำตัวประชาชน'}`,
(val) => val.length >= 13 || `${'กรุณากรอกเลขบัตรประจำตัวประชาชนให้ครบ'}`
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกเลขบัตรประจำตัวประชาชนให้ถูกต้อง'}`
]"
label="เลขบัตรประจำตัวประชาชน"
/>
@ -276,7 +277,7 @@
v-model="informaData.tel"
:rules="[
(val) => !!val || `${'กรุณากรอก โทรศัพท์'}`,
(val) => val.length >= 9 || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ครบ'}`
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ถูกต้อง'}`
]"
:label="`${'โทรศัพท์'}`"
/>
@ -295,7 +296,7 @@
v-model="informaData.phone"
:rules="[
(val) => !!val || `${'กรุณากรอก โทรศัพท์มือถือ'}`,
(val) => val.length >= 10 || `${'กรุณากรอกข้อมูลโทรศัพท์มือถือให้ครบ'}`
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกข้อมูลโทรศัพท์มือถือให้ถูกต้อง'}`
]"
:label="`${'โทรศัพท์มือถือ'}`"
/>

View file

@ -232,13 +232,18 @@
hide-bottom-space
:outlined="status == 'register' || status == 'rejectRegister'"
dense
counter
maxlength="10"
lazy-rules
type="textarea"
type="tel"
autogrow
:readonly="!(status == 'register' || status == 'rejectRegister')"
:borderless="!(status == 'register' || status == 'rejectRegister')"
v-model="occupationData.tel"
:rules="[(val) => !!val || `${'กรุณากรอก โทรศัพท์'}`]"
:rules="[
(val) => !!val || `${'กรุณากรอก โทรศัพท์'}`,
(val) => /^[0-9]*$/.test(val) || 'กรุณากรอก โทรศัพท์ให้ถูกต้อง'
]"
:label="`${'โทรศัพท์'}`"
/>
</div>

View file

@ -25,7 +25,7 @@ interface Information {
nationality: string | null
ethnicity: string | null
religionId: string | null
tel: string | null
tel: int | null
phone: string | null
email: string | null
province: string | null