mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-19 15:14:40 +09:00
fix(web): handle TypeCastError when building form validation messages (#40212)
Fixes https://github.com/go-gitea/gitea/issues/40210 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
ede9ec3e10
commit
df4544a58b
3 files changed
+28
-9
No files matched your search
@@ -28,10 +28,13 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// TODO: need to refactor the binding package, let the rules provide error message directly.
|
||||
// Don't use the fragile Classification and useless&incorrect Message field in the future.
|
||||
|
||||
errContentType = "ContentTypeError"
|
||||
errDeserialization = "DeserializationError"
|
||||
errTypeCast = "TypeCastError"
|
||||
errRule = "RuleError"
|
||||
ErrTypeCast = errTypeCast
|
||||
|
||||
ErrRequired = "RequiredError"
|
||||
ErrAlphaDashDot = "AlphaDashDotError"
|
||||
|
||||
Reference in new issue
Block a user