@Jon, thanks for your input :)
If you set some value on data-parsley-intl-tel-no then it would be passed in requirement. You can use that value in any way you wish. It might indicate some option for your custom validator.
Yes i did play around a bit and find out how requirement works but i don't think that argument is going to be of any use to me :|
the line i need to return is the following:
- $("#phone").intlTelInput("isValidNumber"); // here the element $('#phone') ofcourse would be a variable and not just a hardcorded element
Its to check if the phone number is a valid phone number for a particular country, the plugin i am using to get international number inputs is
intl-tel-input.
Now the function isValidNumber does't seem to work on a value but needs the element on which the intl-tel-input plugin has been initialized.
So i need one of two things to happen here ,
1. either find a way to pass the input element into my custom validator
2. Find a way to validate the input value using a in-built function in intl-tel-input.
I just happened to figure that the 1st option would be easier, as i have already surfed the docs for intl-tel-input and there does't seem to be a way to validate a value accurately as of now.