github go-playground/validator v9.1.0
Release 9.1.0

latest releases: v10.23.0, v10.22.1, v10.22.0...
8 years ago

What's New?

🎉 This change has been a long time coming 🎉

The story so far....

A long time ago in a validator package on a github server far far away...

A request was made for allowing custom validations #174 but the evil i18n,

localization of errors, stood in our way #230. An expedition was dispatched to

search the vastness open source, but alas no suitable i18n package with correct

pluralization rules could be found; the outlook for validator seemed grim; until a

developer created an i18n and l10n helper package locales and an i18n package

universal-translator that wraps it and then jammed that functionality deep inside of validator!

So without further ado:

  • Added i18n aware Custom Error Message translations see here for an example
    • Custom Translation can be registered using RegisterTranslation
    • A Default set of translations exists for the en locale here; if anyone could help in adding more for other locales that would be appreciated 😄

Don't miss a new validator release

NewReleases is sending notifications on new releases.