Skip to content

Is there any way to validation string array items in enum #2811

Closed Answered by FillZpp
moxianfeng asked this question in Support
Discussion options

You must be logged in to vote
type AA struct {
    // +kubebuilder:validation:MinItems=1
    Role []RoleValue `json:"role,omtiempty"
}

// +kubebuilder:validation:Enum=admin;reseller;operator
type RoleValue string

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by camilamacedo86
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
3 participants