nodivbyzero

Results 29 comments of nodivbyzero

Thanks for the effort on this! Please try to keep PRs focused on a single feature or change. Smaller, more focused PRs are easier to review and get merged faster....

@zsaw try to use this: ``` type form struct { ExpirtTime string `validate:"required,datetime=2006-01-02"` } ```

@MoNSTRiKcom Here is the test which covers your cases: ``` func TestDatetimeWithTZValidation(t *testing.T) { tests := []struct { value string `validate:"datetime=2006-01-02T15:04:05Z07:00"` tag string }{ {"2017-07-14T00:00:00Z +03:00", `datetime=2006-01-02T15:04:05Z -07:00`}, {"2017-07-14T00:00:00Z+03:00", `datetime=2006-01-02T15:04:05Z-07:00`},...

@hi-rai Regarding ``` // Should fail, but passes fmt.Println("Outer1:", v.Struct(Outer1{Inner: map[string]Inner{ "a": {Value: "1234567890"}, }})) ``` This validation passes because `Outer1` applies validation rules to the keys of the map....

I looked into this issue and can confirm that validation doesn't work for map fields with struct values, although it does work for map fields with simple value types. If...

Interesting scenario... I'd love to see solutions from our community! Personally, I would create a custom validator for this case.

Could you provide a test case in which your data does not pass the `iso3166_1_alpha2` validation? Similar to https://github.com/go-playground/validator/blob/6c3307e6c64040ebc0efffe9366927c68146ffba/validator_test.go#L12612-L12614

Thank you for your contribution! Adding a new validation function requires updating the documentation and README. Otherwise, everything looks good to me.

I've added a few comments suggesting readability improvements. I recommend keeping the original test functions unchanged and adding new ones for the `Stringer` type. Also, ensure the GitHub Actions checks...