From e94e3f6ebc44931fdad50744e3108570377c993a Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Mon, 13 Feb 2023 10:34:55 +0100 Subject: [PATCH] Fix time layout in FormValidator.CheckValidDate --- pkg/form.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/form.go b/pkg/form.go index b8e84bd..84c6576 100644 --- a/pkg/form.go +++ b/pkg/form.go @@ -196,7 +196,7 @@ func (v *FormValidator) CheckValidURL(field *InputField, message string) bool { } func (v *FormValidator) CheckValidDate(field *InputField, message string) bool { - _, err := time.Parse("2006-02-01", field.Val) + _, err := time.Parse("2006-01-02", field.Val) return v.checkInput(field, err == nil, message) }