Skip to content

Commit

Permalink
fix(webhook): fix msg expressions.
Browse files Browse the repository at this point in the history
Signed-off-by: Electronic-Waste <[email protected]>
  • Loading branch information
Electronic-Waste committed Feb 5, 2025
1 parent 4d2a230 commit 25ae4ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webhook/v1beta1/experiment/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ func (g *DefaultValidator) ValidateExperiment(instance, oldInst *experimentsv1be
if !namingConvention.MatchString(instance.Name) || len(instance.Name) > 40 {
msg := "name must consist of lower case alphanumeric characters or '-'," +
" start with an alphabetic character, and end with an alphanumeric character" +
" (e.g. 'my-name', or 'abc-123', regex used for validation is '^[a-z]([-a-z0-9]*[a-z0-9])?)'" +
" and may not be larger than 40 characters. "
" (e.g. 'my-name', or 'abc-123', regex used for validation is '^[a-z]([-a-z0-9]*[a-z0-9])?)')" +
" and may not be longer than 40 characters. "

allErrs = append(allErrs, field.Invalid(field.NewPath("metadata").Child("name"), instance.Name, msg))
}
Expand Down

0 comments on commit 25ae4ed

Please sign in to comment.