We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b290147 + 45f69ce commit 7b84f60Copy full SHA for 7b84f60
pkg/plugins/golang/options.go
@@ -143,7 +143,13 @@ func (opts Options) Validate() error {
143
return fmt.Errorf("invalid Kind: %#v", validationErrors)
144
}
145
146
- // TODO: validate plural strings if provided
+ if opts.Plural != "" {
147
+ validationErrors = append(validationErrors, validation.IsDNS1035Label(opts.Plural)...)
148
+
149
+ if len(validationErrors) != 0 {
150
+ return fmt.Errorf("invalid Plural: %#v", validationErrors)
151
+ }
152
153
154
// Ensure apiVersions for k8s types are empty or valid.
155
for typ, apiVersion := range map[string]string{
0 commit comments