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

Fix CustomMessage not passing the correct parameters #46

Merged
merged 1 commit into from
Nov 7, 2016

Conversation

corrspt
Copy link

@corrspt corrspt commented Nov 7, 2016

I happened to create a new validation with a custom message that didn't work as I expected. I was not receiving the key, I dug into the source code and the invocation to call was passing the key as this.

This PR fixes this and also fixes the test. The test passed because it was essentially checking if the message was correct, but it was invoking the message with call the same way as the code. So both the test and code had that small bug.

Hope it helps.

The invocation of `.call` passes the property as first value, but the first
value of .call is the `this`. Updates the test to verify both key and value are correctly
passed
@esbanarango
Copy link
Owner

@corrspt Thank you for taking the time 👍 !

@esbanarango esbanarango merged commit 8021b94 into esbanarango:master Nov 7, 2016
@corrspt
Copy link
Author

corrspt commented Nov 7, 2016

Glad I could help 👍 Keep up the great work with this addon!

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