Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom msg arg passed to All Validation classes #21

Open
happyshows opened this issue May 2, 2019 · 1 comment
Open

Allow custom msg arg passed to All Validation classes #21

happyshows opened this issue May 2, 2019 · 1 comment

Comments

@happyshows
Copy link

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"
@multimeric
Copy link
Owner

multimeric commented May 3, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants