alimanfoo / csvvalidator

A small CSV validator library for Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support 'check_...' named methods on validator extension class

alimanfoo opened this issue · comments

The CSVValidator class currently inspects itself and looks for any methods named 'assert_...', and invokes these for each record, supporting a convenient convention for defining more complex validation checks.

It would be useful to also look for any methods named 'check_...' and invoke these in a similar way, catching ValidationExceptions representing problems.

Implemented in release 1.1 - any methods with names starting 'check' will be invoked as record check methods.