update

parent ce18b923
...@@ -136,21 +136,33 @@ export default defineComponent({ ...@@ -136,21 +136,33 @@ export default defineComponent({
(val?: string) => (val?: string) =>
(val && val.trim().length) || (val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireUserName'), i18n.global.t('customer.validateMessages.requireUserName'),
(val?: string) =>
(val && val.trim().length < 30) ||
i18n.global.t('customer.validateMessages.lengthUserName'),
]; ];
const passwordRules = [ const passwordRules = [
(val?: string) => (val?: string) =>
(val && val.trim().length) || (val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requirePassword'), i18n.global.t('customer.validateMessages.requirePassword'),
(val?: string) =>
(val && val.trim().length >= 8) ||
i18n.global.t('customer.validateMessages.lengthPassword'),
]; ];
const codeRules = [ const codeRules = [
(val?: string) => (val?: string) =>
(val && val.trim().length) || (val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireCode'), i18n.global.t('customer.validateMessages.requireCode'),
(val?: string) =>
(val && val.trim().length <= 50) ||
i18n.global.t('customer.validateMessages.lengthCode'),
]; ];
const customerNameRules = [ const customerNameRules = [
(val?: string) => (val?: string) =>
(val && val.trim().length) || (val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireCustomerName'), i18n.global.t('customer.validateMessages.requireCustomerName'),
(val?: string) =>
(val && val.trim().length <= 50) ||
i18n.global.t('customer.validateMessages.lengthCustomerName'),
]; ];
const businessNameRules = [ const businessNameRules = [
(val?: string) => (val?: string) =>
...@@ -161,6 +173,9 @@ export default defineComponent({ ...@@ -161,6 +173,9 @@ export default defineComponent({
(val?: string) => (val?: string) =>
(val && val.trim().length) || (val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireTaxCode'), i18n.global.t('customer.validateMessages.requireTaxCode'),
(val?: string) =>
(val && val.trim().length <= 20) ||
i18n.global.t('customer.validateMessages.LengthTaxCode'),
]; ];
const phoneRules = [ const phoneRules = [
(val?: string) => (val?: string) =>
...@@ -196,6 +211,9 @@ export default defineComponent({ ...@@ -196,6 +211,9 @@ export default defineComponent({
(val?: string) => (val?: string) =>
(val && val.trim().length) || (val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireRepresentative'), i18n.global.t('customer.validateMessages.requireRepresentative'),
(val?: string) =>
(val && val.trim().length <= 50) ||
i18n.global.t('customer.validateMessages.lengthRepresentative'),
]; ];
const positionRules = [ const positionRules = [
(val?: string) => (val?: string) =>
......
...@@ -351,11 +351,17 @@ export default { ...@@ -351,11 +351,17 @@ export default {
emailExists: 'Email đã tồn tại', emailExists: 'Email đã tồn tại',
phoneExists: 'Số điện thoại đã tồn tại', phoneExists: 'Số điện thoại đã tồn tại',
requireUserName: 'Vui lòng nhập Tên đăng nhập', requireUserName: 'Vui lòng nhập Tên đăng nhập',
lengthUserName: 'Tên đăng nhập không được quá 30 ký tự',
requirePassword: 'Vui lòng nhập Mật khẩu', requirePassword: 'Vui lòng nhập Mật khẩu',
lengthPassword: 'Độ dài mật khẩu tối thiểu 8 ký tự',
requireCode: 'Vui lòng nhập Mã khách hàng', requireCode: 'Vui lòng nhập Mã khách hàng',
lengthCode: 'Mã khách hàng không được quá 50 ký tự',
lengthCustomerName: 'Họ tên không được quá 50 ký tự',
lengthRepresentative: 'Họ tên người đại diện không được quá 50 ký tự',
requireCustomerName: 'Vui lòng nhập Họ tên', requireCustomerName: 'Vui lòng nhập Họ tên',
requireBusinessName: 'Vui lòng nhập Tên Doanh nghiệp', requireBusinessName: 'Vui lòng nhập Tên Doanh nghiệp',
requireTaxCode: 'Vui lòng nhập Mã số thuế', requireTaxCode: 'Vui lòng nhập Mã số thuế',
LengthTaxCode: 'Mã số thuế không được quá 20 ký tự',
requireEmail: 'Vui lòng nhập Email', requireEmail: 'Vui lòng nhập Email',
isEmail: 'Email không hợp lệ', isEmail: 'Email không hợp lệ',
requirePhone: 'Vui lòng nhập Số điện thoại', requirePhone: 'Vui lòng nhập Số điện thoại',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment