CargoSense / vex

Data Validation for Elixir
MIT License
595 stars 60 forks source link

Adding errors to structs api #60

Closed skbolton closed 2 years ago

skbolton commented 5 years ago

Thank you so much for this library. I love how modules have MyStruct.valid?(data). Would it be possible to have MyStruct.errors(data) get put on structs also? My reasoning is partly out of convenience but also because I would like Vex to be an implementation detail. This would make the module have the perfect api for outside callers to work with it without needing to know to call Vex.errors(a_struct). I could even do the PR for this if you guys feel its a good idea?