daddyz / phonelib

Ruby gem for phone validation and formatting using google libphonenumber library data
MIT License
1.04k stars 130 forks source link

Getting validation errors messages #301

Open Titouaks opened 4 months ago

Titouaks commented 4 months ago

Hi there, Not sure I'm right opening an issue, let me know if it rely elsewhere for this kind of demand

I was wondering if it could be a feature to add the details errors messages when checking if a phone number is valid or not. Likewise we have with active record validations when a record is invalid, we can call the #valid? method on the instance and get the errors messages through #errors and #errors.messages

Could this be a improvement of the lib or this already exist in it ?