|
|
@@ -526,8 +526,9 @@ const BusCustomFormWizard = (props) => { |
|
|
|
phone: yup.string().min(8, displayErrorMsg('請輸入最少8位數字')).required(displayErrorMsg('請輸入聯絡電話')), |
|
|
|
fax: yup.string().min(8, displayErrorMsg('請輸入最少8位數字')), |
|
|
|
brExpiryDate: yup.date().min(new Date().toISOString().split("T")[0], displayErrorMsg('請輸入商業登記證有效日期')).max("2099-12-31", displayErrorMsg('請輸入商業登記證有效日期')).required(displayErrorMsg('請輸入商業登記證有效日期')), |
|
|
|
brNo: yup.string().required(displayErrorMsg('請輸入商業登記證號碼')).test('checkBrNoFormat', displayErrorMsg(`請輸入有效商業登記證號碼 (e.g. 12341234-123-12-12-1)`), function (value) { |
|
|
|
var brNo_pattern = /[0-9]{8}-[0-9]{3}-(0[1-9]|1[012])-[0-9]{2}-[0-9A-Z]{1}/ |
|
|
|
brNo: yup.string().max(8).required(displayErrorMsg('請輸入商業登記證號碼')).test('checkBrNoFormat', displayErrorMsg(`請輸入有效商業登記證號碼 (e.g. 12341234)`), function (value) { |
|
|
|
// var brNo_pattern = /[0-9]{8}-[0-9]{3}-(0[1-9]|1[012])-[0-9]{2}-[0-9A-Z]{1}/ |
|
|
|
var brNo_pattern = /[0-9]{8}/ |
|
|
|
if (value !== undefined) { |
|
|
|
if (value.match(brNo_pattern)) { |
|
|
|
return true |
|
|
@@ -834,7 +835,7 @@ const BusCustomFormWizard = (props) => { |
|
|
|
<Stack spacing={1}> |
|
|
|
<InputLabel htmlFor="brNo-signup" sx={{ whiteSpace: 'pre-wrap', wordWrap: 'break-word' }}> |
|
|
|
<Typography variant="pnspsFormHeader"> |
|
|
|
商業登記證號碼 (e.g. 12341234-123-12-12-1) |
|
|
|
商業登記證號碼 (e.g. 12341234) |
|
|
|
<span style={{ color: '#f10000' }}>*</span> |
|
|
|
</Typography> |
|
|
|
</InputLabel> |
|
|
|