| @@ -48,11 +48,11 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| enableReinitialize: true, | enableReinitialize: true, | ||||
| initialValues: currentUserData, | initialValues: currentUserData, | ||||
| validationSchema: yup.object().shape({ | validationSchema: yup.object().shape({ | ||||
| enCompanyName: yup.string().max(255).required(displayErrorMsg('請輸入英文名稱')), | |||||
| chCompanyName: yup.string().max(255, displayErrorMsg('請輸入中文名稱')).nullable(), | |||||
| enCompanyName: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'userRequireEnglishName'}))), | |||||
| chCompanyName: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'userRequireChineseName'}))).nullable(), | |||||
| addressLine1: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine1'}))), | addressLine1: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine1'}))), | ||||
| addressLine2: yup.string().max(255, displayErrorMsg("length must <= 255")), | |||||
| addressLine3: yup.string().max(255, displayErrorMsg("length must <= 255")), | |||||
| addressLine2: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'noMoreThen255Words'}))), | |||||
| addressLine3: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'noMoreThen255Words'}))), | |||||
| fax_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))).nullable(), | fax_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))).nullable(), | ||||
| tel_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))), | tel_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))), | ||||
| phoneNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'requiredValidNumber'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireContactNumber'}))), | phoneNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'requiredValidNumber'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireContactNumber'}))), | ||||
| @@ -46,8 +46,8 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||||
| enableReinitialize: true, | enableReinitialize: true, | ||||
| initialValues: currentUserData, | initialValues: currentUserData, | ||||
| validationSchema: yup.object().shape({ | validationSchema: yup.object().shape({ | ||||
| enCompanyName: yup.string().max(255, displayErrorMsg("請輸入英文名稱")).required(displayErrorMsg('請輸入英文名稱')), | |||||
| chCompanyName: yup.string().max(255, displayErrorMsg('請輸入中文名稱')).nullable(), | |||||
| enCompanyName: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'userRequireEnglishName'}))).required(displayErrorMsg(intl.formatMessage({id: 'userRequireEnglishName'}))), | |||||
| chCompanyName: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'userRequireChineseName'}))).nullable(), | |||||
| addressLine1: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine1'}))), | addressLine1: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine1'}))), | ||||
| addressLine2: yup.string().max(255).nullable(), | addressLine2: yup.string().max(255).nullable(), | ||||
| addressLine3: yup.string().max(255).nullable(), | addressLine3: yup.string().max(255).nullable(), | ||||
| @@ -46,8 +46,8 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||||
| addressLine2: yup.string().max(255).nullable(), | addressLine2: yup.string().max(255).nullable(), | ||||
| addressLine3: yup.string().max(255).nullable(), | addressLine3: yup.string().max(255).nullable(), | ||||
| emailAddress: yup.string().email(intl.formatMessage({id: 'validEmailFormat'})).max(255).required(intl.formatMessage({id: 'requireEmail'})), | emailAddress: yup.string().email(intl.formatMessage({id: 'validEmailFormat'})).max(255).required(intl.formatMessage({id: 'requireEmail'})), | ||||
| identification: yup.string().min(7, "請輸入證件號碼").required('請輸入證件號碼'), | |||||
| checkDigit: yup.string().max(1).required('請輸入括號內的數字或字母').nullable(), | |||||
| identification: yup.string().min(7, intl.formatMessage({id: 'requireIdDocNumber'})).required(intl.formatMessage({id: 'requireIdDocNumber'})), | |||||
| checkDigit: yup.string().max(1).required(intl.formatMessage({id: 'requiredNumberInQuote'})).nullable(), | |||||
| idDocType: yup.string().max(255).required(intl.formatMessage({id: 'requireIdDocType'})), | idDocType: yup.string().max(255).required(intl.formatMessage({id: 'requireIdDocType'})), | ||||
| tel_countryCode: yup.string().min(3, intl.formatMessage({id: 'require3Number'})).required(intl.formatMessage({id: 'requireDialingCode'})), | tel_countryCode: yup.string().min(3, intl.formatMessage({id: 'require3Number'})).required(intl.formatMessage({id: 'requireDialingCode'})), | ||||
| fax_countryCode: yup.string().min(3, intl.formatMessage({id: 'require3Number'})), | fax_countryCode: yup.string().min(3, intl.formatMessage({id: 'require3Number'})), | ||||
| @@ -49,7 +49,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||||
| initialValues: currentUserData, | initialValues: currentUserData, | ||||
| validationSchema: yup.object().shape({ | validationSchema: yup.object().shape({ | ||||
| contactPerson: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'userRequireName'}))), | contactPerson: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'userRequireName'}))), | ||||
| enCompanyName: yup.string().max(255).required(displayErrorMsg('請輸入英文名稱')), | |||||
| enCompanyName: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'userRequireEnglishName'}))), | |||||
| chCompanyName: yup.string().max(255).nullable(), | chCompanyName: yup.string().max(255).nullable(), | ||||
| addressLine1: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine1'}))), | addressLine1: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine1'}))), | ||||
| addressLine2: yup.string().max(255).nullable(), | addressLine2: yup.string().max(255).nullable(), | ||||
| @@ -112,7 +112,7 @@ const BusRegister = () => { | |||||
| const handleNext = async () => { | const handleNext = async () => { | ||||
| const captchaTest = await handleCaptcha(); | const captchaTest = await handleCaptcha(); | ||||
| if (!captchaTest) { | if (!captchaTest) { | ||||
| notifyActionError("請輸入有效驗證") | |||||
| notifyActionError(intl.formatMessage({id: 'validVerify'})) | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -105,7 +105,7 @@ const Register = () => { | |||||
| } | } | ||||
| const captchaTest = await handleCaptcha(); | const captchaTest = await handleCaptcha(); | ||||
| if (!captchaTest) { | if (!captchaTest) { | ||||
| notifyActionError("請輸入有效驗證") | |||||
| notifyActionError(intl.formatMessage({id: 'validVerify'})) | |||||
| return; | return; | ||||
| } | } | ||||
| const test = await handleCheckID() | const test = await handleCheckID() | ||||
| @@ -114,7 +114,7 @@ const Register = () => { | |||||
| const captchaTest = await handleCaptcha(); | const captchaTest = await handleCaptcha(); | ||||
| if (!captchaTest) { | if (!captchaTest) { | ||||
| notifyActionError("請輸入有效驗證") | |||||
| notifyActionError(intl.formatMessage({id: 'validVerify'})) | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -624,7 +624,7 @@ const CustomFormWizard = (props) => { | |||||
| } | } | ||||
| } | } | ||||
| }), | }), | ||||
| checkDigit: yup.string().max(1).required(displayErrorMsg('請輸入括號內的數字或字母')), | |||||
| checkDigit: yup.string().max(1).required(displayErrorMsg(intl.formatMessage({id: 'requiredNumberInQuote'}))), | |||||
| idDocType: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'requireIdDocType'}))), | idDocType: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'requireIdDocType'}))), | ||||
| phoneCountryCode: yup.string().min(2, displayErrorMsg(intl.formatMessage({id: 'requireAtLeast2Number'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))), | phoneCountryCode: yup.string().min(2, displayErrorMsg(intl.formatMessage({id: 'requireAtLeast2Number'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))), | ||||
| // faxCountryCode: yup.string().min(3,'請輸入3位數字'), | // faxCountryCode: yup.string().min(3,'請輸入3位數字'), | ||||
| @@ -181,6 +181,8 @@ | |||||
| "idDocType": "Document Category", | "idDocType": "Document Category", | ||||
| "requireIdDocType": "Please enter the document type", | "requireIdDocType": "Please enter the document type", | ||||
| "idDocNumber": "ID number", | "idDocNumber": "ID number", | ||||
| "requireIdDocNumber": "Please enter the document ID", | |||||
| "requiredNumberInQuote": "Please enter the numbers or letters in brackets", | |||||
| "sameAsYourIdDoc": "Same as your ID document", | "sameAsYourIdDoc": "Same as your ID document", | ||||
| "pwRemark1": "At least 8 characters, the more characters the better", | "pwRemark1": "At least 8 characters, the more characters the better", | ||||
| @@ -181,6 +181,8 @@ | |||||
| "idDocType": "证件类别", | "idDocType": "证件类别", | ||||
| "requireIdDocType": "请输入证件类别", | "requireIdDocType": "请输入证件类别", | ||||
| "idDocNumber": "证件号码", | "idDocNumber": "证件号码", | ||||
| "requireIdDocNumber": "请输入证件号码", | |||||
| "requiredNumberInQuote": "请输入括号内的数字或字母", | |||||
| "sameAsYourIdDoc": "与你的身份证明文件相同", | "sameAsYourIdDoc": "与你的身份证明文件相同", | ||||
| "pwRemark1": "至少8个字元,字元越多越好", | "pwRemark1": "至少8个字元,字元越多越好", | ||||
| @@ -181,6 +181,8 @@ | |||||
| "idDocType": "證件類別", | "idDocType": "證件類別", | ||||
| "requireIdDocType": "請輸入證件類別", | "requireIdDocType": "請輸入證件類別", | ||||
| "idDocNumber": "證件號碼", | "idDocNumber": "證件號碼", | ||||
| "requireIdDocNumber": "請輸入證件號碼", | |||||
| "requiredNumberInQuote": "請輸入括號內的數字或字母", | |||||
| "sameAsYourIdDoc": "與你的身份證明文件相同", | "sameAsYourIdDoc": "與你的身份證明文件相同", | ||||
| "pwRemark1": "至少8個字元,字元越多越好", | "pwRemark1": "至少8個字元,字元越多越好", | ||||