Open PetroGromovo opened 4 years ago
I am experiencing the same issue
I got some hints here : https://forum.vuejs.org/t/setting-customvalidate-in-vue-tel-input-hung-my-page-deadly/99926/2 But it did not help me...
You pass the props value like this :custom-validate="phoneValue === '' ? false : /^[0-9]+$/". Make sure your value cannot be null or undefined when your component is mount.
The issue you are experiencing is because when the component is mounted, the initial value of your phone number field is empty. Add into your regex possiblity that it can be empty ^$ and you should be fine
Hello, I added https://github.com/EducationLink/vue-tel-input to my bootstrap-vue project and looking at customValidate property I want to make validation to phone number like “(123) 456-7890”. I suppose that customValidate is javascript regex validation and googled this https://stackoverflow.com/questions/4338267/validate-phone-number-with-javascript branch I try several methods from it, like :
But setting this property :
my page hung deadly
I tried some more regex samples with the same results. Is it invalid format or I need some wrapper ?
Thanks!