Fix time layout in FormValidator.CheckValidDate
This commit is contained in:
parent
3891a01fd5
commit
e94e3f6ebc
|
@ -196,7 +196,7 @@ func (v *FormValidator) CheckValidURL(field *InputField, message string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *FormValidator) CheckValidDate(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)
|
return v.checkInput(field, err == nil, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue