diff --git a/client/src/components/AddUser.vue b/client/src/components/AddUser.vue index dd3534f6..208ed5a7 100644 --- a/client/src/components/AddUser.vue +++ b/client/src/components/AddUser.vue @@ -18,7 +18,7 @@ + :rules="requiredRules"> @@ -83,7 +83,6 @@ import { mobileRules, jobRules, addressRules, - telegramRules, requiredStringRules, requiredRules } from '@/utils' @@ -252,7 +251,6 @@ export default { mobileRules, jobRules, addressRules, - telegramRules, requiredStringRules, requiredRules, isLoading, diff --git a/client/src/components/UpdateUser.vue b/client/src/components/UpdateUser.vue index bc7b3a6f..30c7fea7 100644 --- a/client/src/components/UpdateUser.vue +++ b/client/src/components/UpdateUser.vue @@ -49,7 +49,7 @@ + :rules="requiredRules"> @@ -110,7 +110,6 @@ import { mobileRules, jobRules, addressRules, - telegramRules, requiredStringRules, requiredRules, formatDate, @@ -281,7 +280,6 @@ export default { addressRules, supervisorPage, supervisorCount, - telegramRules, requiredStringRules, requiredRules, isLoading, diff --git a/client/src/utils/validators.ts b/client/src/utils/validators.ts index 2e9bf0b2..8a950bf8 100644 --- a/client/src/utils/validators.ts +++ b/client/src/utils/validators.ts @@ -44,13 +44,7 @@ export const addressRules = [ // (v: string) => // (v && v.length >= 3 && v.length <= 50) || 'Social Number must be between 3 and 50 characters.' // ] -export const telegramRules = [ - (v: string) => typeof v === 'string' || 'Telegram must be a string.', - (v: string) => !!v || 'Telegram is required.', - (v: string) => /^@([A-Za-z0-9_]{1,255})$/.test(v) || 'Telegram handle is not valid.', - (v: string) => - (v && v.length >= 3 && v.length <= 50) || 'Telegram must be between 3 and 50 characters.' -] + export const requiredStringRules = [ (v: string) => typeof v === 'string' || 'This field must be a string.', (v: string) => !!v || 'This field is required.'