Salesflare / joi-phone-number

Phone number validation rule for Joi
MIT License
72 stars 14 forks source link

feat: allow Joi references to be passed as options #143

Closed swantzter closed 4 years ago

swantzter commented 4 years ago

Uses Joi's built-in handling of arguments to effortlessly handle references. The args array is unfortunately not too well documented

fix #50

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 94f1a9634fe6c04b6944768d22bb848272ecb311 on swantzter:master into 8da43b89974692308467ba37087efc928bdcab23 on Salesflare:master.

AdriVanHoudt commented 4 years ago

Thanks for this ✨ It seems like args.assert supports joi schemas so I will change the asserts to schemas again after merging :D It is indeed true that this a part of joi that could use some docs love

swantzter commented 4 years ago

Oh! I had little luck when i tried using Joi schemas in args previously, I will have to check it out again. Thanks!

AdriVanHoudt commented 4 years ago

Seems like basic stuff works but somehow the .single is not doing it :D