mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-21 08:22:57 +02:00
refactor: clean up form binding & validation (#38873)
Clarify the "validation" and "error display" logic. All the copied&pasted `Validate` functions are removed.
This commit is contained in:
1 parent
8b40df255b
commit
72a9debaff
30 files changed
+331
-737
No files matched your search
@@ -26,14 +26,12 @@ func Test_RegexPatternValidation(t *testing.T) {
|
||||
data: TestForm{
|
||||
RegexPattern: "",
|
||||
},
|
||||
expectedErrors: binding.Errors{},
|
||||
},
|
||||
{
|
||||
description: "Valid regex",
|
||||
data: TestForm{
|
||||
RegexPattern: `(\d{1,3})+`,
|
||||
},
|
||||
expectedErrors: binding.Errors{},
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user