Closed frou closed 5 years ago
Thinking about this more, I guess the general philosophy is that zero-values in the Go sense are always considered valid unless we explicitly indicate that they are not?
Yes. 0 is considered as an empty value. You can add a required
rule to ensure a value is entered.
Thank you. I starred a bunch of Go validation repos and finally am getting around to evaluating them. Your "normal code" approach is cool!
Is it intended behaviour that the following does not return an error?
I know we can use
validation.Required
but 0 is definitely < 10 also :)