Closed attilaolah closed 10 years ago
Yes, good idea. It is optional but should be documented. Would you like to submit a PR? I might not get around to it for a bit.
Sure. I'll have some time tomorrow.
I'm gonna close this for now; the PR is still welcome if you'd like, but it doesn't matter either way I think.
See this discussion for details.
Basically, implementing the
Validate
method with a pointer receiver allows the validation to be used as a "prepare" function, e.g. trimming whitespace or lower-casing email addresses.