Skip to content


Here are 930 public repositories matching this topic...

muhammadkholidb commented Oct 1, 2019

Package version eg. v8, v9:


Issue, Question or Enhancement:

Is it possible to use oneof validation with values containing space character? Tried with single quote but it did not seem to work.

Code sample, to showcase or reproduce:

type Data struct {
    Status string `json:"status" validate:"required,oneof='Awaiting Verification' 'Verified' 'Failed Veri
morningvera commented Feb 18, 2020

For completion, we should offer an As method like the one in Go 1.13 errors ( We should try to make this more reliable than Go's version by preventing panics: "As will panic if target is not a non-nil pointer to either a type that implements error, or to any interface type." Seems like we could just return false in these cases instead.

Improve this page

Add a description, image, and links to the error-handling topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the error-handling topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.