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
pattern
"^\\+\\d{10, 15}"
phone_number
Output will have RegExp string without special character escapes "^+d{10, 15}"
"^+d{10, 15}"
Output should have valid RegExp string "^\+\d{10, 15}"
"^\+\d{10, 15}"
N/A
Currently I just omit this property with transformer function
transformer
Operating System: MacOS Ventura 13.4 Package Version: 6.16.0 Browser Version: Firefox 114.0.2
The text was updated successfully, but these errors were encountered:
I just wrote this test which is what the Zod generator is doing and it looks correct?
describe('string testing', () => { it('cleanse JS String', () => { expect(new RegExp(jsStringEscape('^\\+\\d{10, 15}'))).toEqual( /^\\+\\d{10, 15}/, ); }); });
Have you tested against 6.20.0 ?
Sorry, something went wrong.
@irrvrsl according to OpenAPI your regex is incorrect.
https://swagger.io/docs/specification/data-models/data-types/
The pattern should be in JS format already like...
pattern: '^\+\d{10, 15}'
melloware
Successfully merging a pull request may close this issue.
What are the steps to reproduce this issue?
pattern
property in your OpenAPI's Schema, e.g."^\\+\\d{10, 15}"
(took from schema.json, pattern forphone_number
property)What happens?
Output will have RegExp string without special character escapes
"^+d{10, 15}"
What were you expecting to happen?
Output should have valid RegExp string
"^\+\d{10, 15}"
Any logs, error output, etc?
N/A
Any other comments?
Currently I just omit this property with
transformer
functionWhat versions are you using?
Operating System: MacOS Ventura 13.4
Package Version: 6.16.0
Browser Version: Firefox 114.0.2
The text was updated successfully, but these errors were encountered: