mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-19 07:31:16 +00:00
chore(typo): fix grammar in comments, API docs and error messages (#38370)
This commit is contained in:
@@ -167,7 +167,7 @@ func validateOptions(field *api.IssueFormField, idx int) error {
|
||||
|
||||
options, ok := field.Attributes["options"].([]any)
|
||||
if !ok || len(options) == 0 {
|
||||
return position.Errorf("'options' is required and should be a array")
|
||||
return position.Errorf("'options' is required and should be an array")
|
||||
}
|
||||
|
||||
for optIdx, option := range options {
|
||||
@@ -270,7 +270,7 @@ func validateDropdownDefault(position errorPosition, attributes map[string]any)
|
||||
options, ok := attributes["options"].([]any)
|
||||
if !ok {
|
||||
// should not happen
|
||||
return position.Errorf("'options' is required and should be a array")
|
||||
return position.Errorf("'options' is required and should be an array")
|
||||
}
|
||||
if defaultValue < 0 || defaultValue >= len(options) {
|
||||
return position.Errorf("the value of 'default' is out of range")
|
||||
|
||||
@@ -268,7 +268,7 @@ body:
|
||||
attributes:
|
||||
label: "a"
|
||||
`,
|
||||
wantErr: "body[0](dropdown): 'options' is required and should be a array",
|
||||
wantErr: "body[0](dropdown): 'options' is required and should be an array",
|
||||
},
|
||||
{
|
||||
name: "dropdown invalid options",
|
||||
|
||||
Reference in New Issue
Block a user