-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
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
expected validate path attribute to be a string: path = "..."
#302
Comments
This is fixed in schemars 1.0.0-alpha.13 🙂 The schema generated from the sample given in this issue is now: {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SampleJdto",
"type": "object",
"properties": {
"projectName": {
"type": "string",
"pattern": "[a-z]{2}$"
}
},
"required": [
"projectName"
]
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because of syntax difference in regex validation between Validator and schemars, compile error occurs when using regex.
In validators,
#[validate(regex(path = *RE_TWO_CHARS))]
While schemars,
#[validate(regex(path = "RE_TWO_CHARS"))]
Sample:
The text was updated successfully, but these errors were encountered: