vlucas / valitron

Valitron is a simple, elegant, stand-alone validation library with NO dependencies
BSD 3-Clause "New" or "Revised" License
1.57k stars 250 forks source link

Index error by rule #330

Open eugene-borovov opened 3 years ago

eugene-borovov commented 3 years ago

Sometimes it is useful to have not only the error message, but also the name of the rule that was violated. The name of the rule can be used as an error code for easier processing by the client.