| @@ -447,7 +447,7 @@ const BusCustomFormWizard = (props) => { | |||||
| faxCountryCode: yup.string().min(2,'請輸入最少2位數字'), | faxCountryCode: yup.string().min(2,'請輸入最少2位數字'), | ||||
| phone: yup.string().min(8,'請輸入最少8位數字').required('請輸入聯絡電話'), | phone: yup.string().min(8,'請輸入最少8位數字').required('請輸入聯絡電話'), | ||||
| fax: yup.string().min(8,'請輸入最少8位數字'), | fax: yup.string().min(8,'請輸入最少8位數字'), | ||||
| brExpiryDate: yup.string().min(8).required('請輸入商業登記證有效日期'), | |||||
| brExpiryDate: yup.date().min(new Date().toISOString().split("T")[0], '請輸入商業登記證有效日期').max("2099-12-31", '請輸入商業登記證有效日期').required('請輸入商業登記證有效日期'), | |||||
| brNo: yup.string().min(8,'請輸入商業登記證號碼').required('請輸入商業登記證號碼'), | brNo: yup.string().min(8,'請輸入商業登記證號碼').required('請輸入商業登記證號碼'), | ||||
| captchaField: yup.string().required('請輸入驗證').oneOf([captcha], '請輸入有效驗證'), | captchaField: yup.string().required('請輸入驗證').oneOf([captcha], '請輸入有效驗證'), | ||||
| }) | }) | ||||
| @@ -754,8 +754,10 @@ const BusCustomFormWizard = (props) => { | |||||
| value={formik.values.brExpiryDate} | value={formik.values.brExpiryDate} | ||||
| name="brExpiryDate" | name="brExpiryDate" | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| onBlur={formik.handleBlur} | |||||
| placeholder="與商業登記證相同" | placeholder="與商業登記證相同" | ||||
| inputProps={{ | inputProps={{ | ||||
| max: "2099-12-31", | |||||
| min: new Date().toISOString().split("T")[0], | min: new Date().toISOString().split("T")[0], | ||||
| onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
| if (e.key === 'Enter') { | if (e.key === 'Enter') { | ||||