v9
Is it possible to use oneof validation with values containing space character? Tried with single quote but it did not seem to work.
type Data struct {
Status string `json:"status" validate:"required,oneof='Awaiting Verification' 'Verified' 'Failed Verification'"`
}
@muhammadkholidb no, unfortunately, this isn't supported for oneoff at the moment.
As a workaround for now though is you can register your own custom validation function which accomplishes the same thing :)
Hello 馃憢 , I'm going to take a crack at this.
Isn't this closed by #541
Most helpful comment
Isn't this closed by #541