We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The code generator is unable to handle the following regexp pattern:
"name": { "type": "string", "pattern": "^[0-9a-zA-Z`]+$" }
The problem here is in ` (U0060) character. The code generator builds the validation helper as:
`
"{{ .NameSpace }}Pattern = regexp.MustCompile(`" + pattern + "`)"
and contains incorrect escaped Go string if pattern contains U0060 character inside. Need to properly escape regexp pattern!
pattern
The text was updated successfully, but these errors were encountered:
also need to escape %, otherwise error message became incorrect because it embeds pattern in format string.
%
If regexp pattern is 0-9%v then we will have:
0-9%v
message: fmt.Sprintf(`must match '0-9%v' but got %q`, *m.Name),
Sorry, something went wrong.
No branches or pull requests
The code generator is unable to handle the following regexp pattern:
The problem here is in
`
(U0060) character. The code generator builds the validation helper as:and contains incorrect escaped Go string if
pattern
contains U0060 character inside.Need to properly escape regexp pattern!
The text was updated successfully, but these errors were encountered: