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 error messages on claim validation #221

Merged

Conversation

tgturner
Copy link
Contributor

Previous to 2.x, using with_validation would allow you to set a custom error message. The ability, as far as I can tell, was lost in 2.x. The PR would bring back some of the functionality. I'm open to any suggested changes!

@victorolinasc
Copy link
Collaborator

Hey @tgturner this is an awesome addition. I am all for it.

I was just thinking that maybe a Keyword list would be better as they are "options". What do you think?

Also the build broke cause mix format --check-formatted failed. Not exactly sure why though...

@tgturner
Copy link
Contributor Author

@victorolinasc Thanks for getting back to me! I updated the PR to use a Keyword list instead of a map. That does seem appropriate. I also made sure to run mix format on the two files this time.

Copy link
Collaborator

@victorolinasc victorolinasc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Nice 2 line change :)

@victorolinasc victorolinasc merged commit c708ed6 into joken-elixir:master Mar 14, 2019
@tgturner
Copy link
Contributor Author

Thanks @victorolinasc! And thanks for working on Joken, it has been a real pleasure to use.

@tgturner tgturner deleted the allow-custom-error-messages branch March 14, 2019 22:02
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

Successfully merging this pull request may close these issues.

2 participants