-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Milestone
Description
We should use our own tag parser instead of the one that the core lib provides (StructParser.Get). This because Go's tag parser is pretty dumb, and can silence errors that in our case is important to highlight.
I.e. a validator tag such as validate:"regexp(´^[a-z0-9-]*@[a-z0-9.]*\.com$´)" would slip by and just return empty since \ in the tag is unescaped. I.e. validate:"regexp(´^[a-z0-9-]*@[a-z0-9.]*\\.com$´)" would be parsed correctly. When it comes to validation, this means that a simple user error could result in a validation rule not being run. Which in turn can be really bad.