How can I do validation for a phone number in Android Saripaar v2?
Does it include a validation class for this, or do I have to write my own?
How can I do validation for a phone number in Android Saripaar v2?
Does it include a validation class for this, or do I have to write my own?
Copyright © 2021 Jogjafile Inc.
(Disclosure: I'm the author)
Hi, phone numbers do not have a universal format and differs from region to region. So, Saripaar doesn't have any built-in validation for phone numbers. You can always create rules that serve your purpose.
To create a custom annotation, see this SO answer.
You can also add a QuickRule that would serve the purpose.
QuickRule
if you want to get the job done easily.