jpmckinney / validictory

🎓 deprecated general purpose python data validator
Other
240 stars 57 forks source link

store fieldname and path for validation errors #89

Closed andruskutt closed 9 years ago

andruskutt commented 9 years ago

Idea for patch is to capture field name also with DependencyValidationError and RequiredFieldValidationError. Also, path to field is stored for all three errors.

Possible problems with backward compatibility: if one uses in subclasses of DependencyValidationError / RequiredFieldValidationError fieldname and/or path properties then these will be overwritten after init method. If one has defined slots for subclasses of these two, setting fieldname and path will fail probably too.

jamesturk commented 9 years ago

thanks!