const idRules = [v => !!v || '* ID is required', v => v.length >= 4 || '* ID must be between 4 and 30 characters', v => v.length <= 30 || '* ID must be between 4 and 30 characters', v => /^[a-zA-Z0-9]+$/.test(v) || '* ID must be alphanumeric'];
const nameRules = [v => !!v || '* Username is required', v => v.length >= 2 || '* Username must be between 2 and 30 characters', v => v.length <= 30 || '* Username must be between 2 and 30 characters', v => /^[a-zA-Z0-9]+$/.test(v) || '* Username must be alphanumeric'];
const passwordRules = [v => !!v || '* Password is required', v => v.length >= 6 || '* Password must be between 6 and 30 characters', v => v.length <= 30 || '* Password must be between 6 and 30 characters', v => /^[A-Za-z\d$@$!%*#?&]{6,}$/.test(v) || '* Password must be alphanumeric and special characters'];
const emailRules = [v => !!v || '* Email is required', v => /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(v) || '* Not valid email format'];

export { emailRules, idRules, nameRules, passwordRules };
