Phone number validator for AdonisJS

Please is there any phone number validator in Adonis js? I recently just picked up Adonis Js and I’m trying to validate a phone number field

1 Like

Nope! But you can extend the validator to add your own validation rules. A more reliable way is to use libphonenumber library to define the rule.

2 Likes

Thank you. I came across the library and also saw an Adonis library that implements it but the maintainer has not upgraded the library since 2017

1 Like