Skip to content

Conversation

@flowonyx
Copy link
Contributor

@flowonyx flowonyx commented Sep 2, 2015

If validator.New is not called, the various validation methods can still be called since they are on the pointer, but it will panic with a slightly cryptic message. This still panics, but with a clear message that will hopefully save some other developers time in debugging.

@deankarn
Copy link
Contributor

deankarn commented Sep 2, 2015

I should be able to get this done later tonight

@flowonyx
Copy link
Contributor Author

flowonyx commented Sep 2, 2015

Thanks! I have no problem with you implementing it in any other way, I just thought it was an easy way to add some clarity.

deankarn pushed a commit that referenced this pull request Sep 2, 2015
Added checking for nil receiver on Validator methods
@deankarn deankarn merged commit 0650f73 into go-playground:v7-development Sep 2, 2015
fairyhunter13 added a commit to fairyhunter13/validator that referenced this pull request Jul 12, 2020
Added checking for nil receiver on Validator methods
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