0

trying to exclude special characters in go playground validator, using hexcode representation

struct  A{
ID string `json:"id" validate:"excludesall=0x3D"`
}

validator behaving unexpectedly, it fails when ID: "123", "12D" but won't fail when ID: "12=" Apparently 0x3D is treated as 0,x,3,D Am I missing something here?

MrE
  • 11
  • 4
  • I am new to go-lang and just trying to follow the go validator documentation. @icza can you provide an example showing a proper way to exclude characters based on hex code? – MrE Nov 09 '22 at 17:58

0 Answers0