Skip to content

Commit

Permalink
feat: validator should support RegisterRegexpStrfmtValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
morlay committed Nov 18, 2024
1 parent 2654f41 commit 74c185a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/validator/validators/strfmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import (
"github.com/octohelm/courier/pkg/validator/internal"
)

func RegisterRegexpStrfmtValidator(regexpStr string, name string, aliases ...string) {
internal.Register(NewRegexpStrfmtValidatorProvider(regexpStr, name, aliases...))
}

func NewRegexpStrfmtValidatorProvider(regexpStr string, name string, aliases ...string) internal.ValidatorProvider {
re := regexp.MustCompile(regexpStr)

Expand Down

0 comments on commit 74c185a

Please sign in to comment.