@@ -9204,16 +9204,16 @@ func TestDatetimeValidation(t *testing.T) {
92049204
92059205func TestTimeZoneValidation (t * testing.T ) {
92069206 tests := []struct {
9207- value string `validate:"timeZone "`
9207+ value string `validate:"timezone "`
92089208 tag string
92099209 expected bool
92109210 }{
92119211 // systems may have different time zone database, some systems time zone are case insensitive
9212- {"America/New_York" , `timeZone ` , true },
9213- {"UTC" , `timeZone ` , true },
9214- {"" , `timeZone ` , false },
9215- {"Local" , `timeZone ` , false },
9216- {"Unknown" , `timeZone ` , false },
9212+ {"America/New_York" , `timezone ` , true },
9213+ {"UTC" , `timezone ` , true },
9214+ {"" , `timezone ` , false },
9215+ {"Local" , `timezone ` , false },
9216+ {"Unknown" , `timezone ` , false },
92179217 }
92189218
92199219 validate := New ()
@@ -9231,14 +9231,14 @@ func TestTimeZoneValidation(t *testing.T) {
92319231 t .Fatalf ("Index: %d time zone failed Error: %s" , i , errs )
92329232 } else {
92339233 val := getError (errs , "" , "" )
9234- if val .Tag () != "timeZone " {
9234+ if val .Tag () != "timezone " {
92359235 t .Fatalf ("Index: %d time zone failed Error: %s" , i , errs )
92369236 }
92379237 }
92389238 }
92399239 }
92409240
92419241 PanicMatches (t , func () {
9242- _ = validate .Var (2 , "timeZone " )
9242+ _ = validate .Var (2 , "timezone " )
92439243 }, "Bad field type int" )
92449244}
0 commit comments