Say I have the following structure with kubebuilder validation markers:
type ToySpec struct {
// +kubebuilder:validation:MaxLength=15
// +kubebuilder:validation:MinLength=1
Name string `json:"name,omitempty"`
}
I wanna do something like this:
spec = ToySpec{Name: ""}
err := Validate(spec) // Should return error as name has length of 0
Is this currently possible?