1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-24 08:57:03 -05:00

Clearer error message

"May" is also interchangeable with "could". "Should" fits better in this context.
This commit is contained in:
erik 2024-03-21 15:37:37 +01:00
parent 84f2aab570
commit 2e0584bdf3

View file

@ -46,7 +46,7 @@ func ValidateNotEmpty(value any, fieldName string) []string {
if isValid {
return []string{}
}
return []string{fmt.Sprintf("Field %v may not be empty", fieldName)}
return []string{fmt.Sprintf("Field %v should not be empty", fieldName)}
}
func ValidateMaxLen(value string, maxLen int, fieldName string) []string {