PandasSchema
PandasSchema copied to clipboard
Allow custom msg arg passed to All Validation classes
Please add additional msg and print toggle args to print issues better.
For example, regular user will not be able to understand what regex pattern means, it could be challenging for even advanced users too when it gets complex. Be able to print additional description of regex expr will help users to understand why it fails.
pattern only
{row: 9658, column: "AccountNumber"}: "Dummy" does not match the pattern "^\d{3,7}$"
vs both
{row: 9658, column: "AccountNumber"}: "Dummy" does not match the pattern "^\d{3,7}$"
which checks for "3 to 7 digits"
vs msg only
{row: 9658, column: "AccountNumber"}: "Dummy" does not pass the check for "3 to 7 digits"
Hmm, this is a reasonable request. At the moment you can always inherit from a given validation and override the default_message
property, but ideally you won't have to do that for normal use. I think I would be happy to add a custom message property to the Validation
class.