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

[feature] Dynamic error messages #5

Open
brayniverse opened this issue Apr 3, 2017 · 0 comments
Open

[feature] Dynamic error messages #5

brayniverse opened this issue Apr 3, 2017 · 0 comments

Comments

@brayniverse
Copy link
Member

I'm working on a new Strong Password validator that will help enforce the use of stronger passwords. The validator will offer various configurable checks such as:

  • comparing the value against dictionary of common, easily guessable, passwords
  • enforcing upper and lowercase letters
  • etc

Because this validator is handling numerous business rules the error message must change based on which rule was broken. It would be great if there was a way to dynamically set or return the validation error message from the validate method or closure.

At the moment the only way to handle this scenario is to split each business rule into it's own validator, or return a generic "Password is too weak" error message.

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

1 participant