|
|
@@ -123,8 +123,8 @@ const CustomFormWizard = (props) => { |
|
|
|
handlePassword(data.password)&& |
|
|
|
handleEmail(data.email)&& |
|
|
|
handleIdNo(data.idNo,selectedIdDocType.type)&& |
|
|
|
handle8Digi(data.phone)&& |
|
|
|
handle6Digi(data.username) |
|
|
|
handlePhone(data.phone)&& |
|
|
|
handleUsername(data.username) |
|
|
|
) |
|
|
|
{ |
|
|
|
setisValid(true) |
|
|
@@ -310,15 +310,15 @@ const CustomFormWizard = (props) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function handle8Digi(value) { |
|
|
|
if (value.length < 8) { |
|
|
|
function handlePhone(value) { |
|
|
|
if (value.length < 11) { |
|
|
|
return false; |
|
|
|
} else { |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function handle6Digi(value) { |
|
|
|
function handleUsername(value) { |
|
|
|
if (value.length < 6) { |
|
|
|
return false; |
|
|
|
} else { |
|
|
@@ -400,7 +400,7 @@ const CustomFormWizard = (props) => { |
|
|
|
.matches(/^(?=.*[!@#%&])/, '請包括最少1個特殊字符'), |
|
|
|
confirmPassword: yup.string().min(8,'請最少輸入8位密碼').required('請確認密碼').oneOf([yup.ref('password'), null], '請輸入相同密碼'), |
|
|
|
enName: yup.string().max(255).required('請輸入英文姓名'), |
|
|
|
chName: yup.string().max(255).required('請輸入中文姓名'), |
|
|
|
chName: yup.string().max(6).required('請輸入中文姓名'), |
|
|
|
address1: yup.string().max(255).required('請輸入第一行地址'), |
|
|
|
address2: yup.string().max(255).required('請輸入第二行地址'), |
|
|
|
address3: yup.string().max(255).required('請輸入第三行地址'), |
|
|
@@ -409,9 +409,9 @@ const CustomFormWizard = (props) => { |
|
|
|
idNo: yup.string().min(7,"請輸入證件號碼").required('請輸入證件號碼'), |
|
|
|
checkDigit:yup.string().max(1).required('請輸入括號內的數字或字母'), |
|
|
|
idDocType: yup.string().max(255).required('請輸入證件類別'), |
|
|
|
phoneCountryCode: yup.string().min(3,'請輸入3位數字').required('請輸入國際區號'), |
|
|
|
phoneCountryCode: yup.string().min(2,'請輸入最少2位數字').required('請輸入國際區號'), |
|
|
|
// faxCountryCode: yup.string().min(3,'請輸入3位數字'), |
|
|
|
phone: yup.string().min(8,'請輸入8位數字').required('請輸入聯絡電話'), |
|
|
|
phone: yup.string().min(8,'請輸入最少8位數字').required('請輸入聯絡電話'), |
|
|
|
// fax: yup.string().min(8,'請輸入8位數字'), |
|
|
|
}), |
|
|
|
}); |
|
|
@@ -421,7 +421,8 @@ const CustomFormWizard = (props) => { |
|
|
|
setSelectedAddress4("") |
|
|
|
setSelectedIdDocType({}) |
|
|
|
setSelectedIdDocInputType(""); |
|
|
|
|
|
|
|
setFileList([]) |
|
|
|
setFileListData([]) |
|
|
|
// setSelectedIdDocLabel("") |
|
|
|
}; |
|
|
|
|
|
|
@@ -720,6 +721,7 @@ const CustomFormWizard = (props) => { |
|
|
|
error={Boolean(formik.touched.idNo && formik.errors.idNo)} |
|
|
|
onBlur={formik.handleBlur} |
|
|
|
inputProps={{ |
|
|
|
maxLength: 18, |
|
|
|
onKeyDown: (e) => { |
|
|
|
if (e.key === 'Enter') { |
|
|
|
e.preventDefault(); |
|
|
@@ -780,6 +782,7 @@ const CustomFormWizard = (props) => { |
|
|
|
onChange={formik.handleChange} |
|
|
|
placeholder="與你的身份證明文件相同" |
|
|
|
inputProps={{ |
|
|
|
maxLength: 6, |
|
|
|
onKeyDown: (e) => { |
|
|
|
if (e.key === 'Enter') { |
|
|
|
e.preventDefault(); |
|
|
@@ -1024,7 +1027,7 @@ const CustomFormWizard = (props) => { |
|
|
|
error={Boolean(formik.touched.phone && formik.errors.phone)} |
|
|
|
onBlur={formik.handleBlur} |
|
|
|
inputProps={{ |
|
|
|
maxLength: 8, |
|
|
|
maxLength: 11, |
|
|
|
onKeyDown: (e) => { |
|
|
|
if (e.key === 'Enter') { |
|
|
|
e.preventDefault(); |
|
|
|