update

parent ce18b923
......@@ -136,21 +136,33 @@ export default defineComponent({
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireUserName'),
(val?: string) =>
(val && val.trim().length < 30) ||
i18n.global.t('customer.validateMessages.lengthUserName'),
];
const passwordRules = [
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requirePassword'),
(val?: string) =>
(val && val.trim().length >= 8) ||
i18n.global.t('customer.validateMessages.lengthPassword'),
];
const codeRules = [
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireCode'),
(val?: string) =>
(val && val.trim().length <= 50) ||
i18n.global.t('customer.validateMessages.lengthCode'),
];
const customerNameRules = [
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireCustomerName'),
(val?: string) =>
(val && val.trim().length <= 50) ||
i18n.global.t('customer.validateMessages.lengthCustomerName'),
];
const businessNameRules = [
(val?: string) =>
......@@ -161,6 +173,9 @@ export default defineComponent({
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireTaxCode'),
(val?: string) =>
(val && val.trim().length <= 20) ||
i18n.global.t('customer.validateMessages.LengthTaxCode'),
];
const phoneRules = [
(val?: string) =>
......@@ -196,6 +211,9 @@ export default defineComponent({
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireRepresentative'),
(val?: string) =>
(val && val.trim().length <= 50) ||
i18n.global.t('customer.validateMessages.lengthRepresentative'),
];
const positionRules = [
(val?: string) =>
......
......@@ -351,11 +351,17 @@ export default {
emailExists: 'Email đã 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',
lengthUserName: 'Tên đăng nhập không được quá 30 ký tự',
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',
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',
requireBusinessName: 'Vui lòng nhập Tên Doanh nghiệp',
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',
isEmail: 'Email không hợp lệ',
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