I just installed vuelidate, and created a helper that checks if the value is phone no. reference
import { helpers } from 'vuelidate/lib/validators';
const phone = helpers.regex('alpha', /^(09)[0-9]{9}/);
My objective is, the input box should accept only email or phone_no, I tried the solution(s) below but none works.
Sol. 1
validations: { username: { valid: phone or email }}
Sol. 2
validations: { username: { valid: phone || email }}
Someone knows how to achieve this?