-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
fix: validation error when ! is in the path #6754
Conversation
Hi @sokra, I fixed regexp inside absolute path validator to be able to check if there is However, I can't test my changes because it seems no matter what I do in Please advice are there any extra steps required to make this work or am I missing something? |
I think you should add a new message when ! is included in absolute path. Here's my solution. p.s. I wonder why people don't use |
schemas/ajv.absolutePath.js
Outdated
if(!passes) { | ||
callback.errors = [getErrorFor(expected, data, schema)]; | ||
|
||
module.exports = ajv => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why code format changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@montogeek prettier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that src code was already formatted with prettier, he didn't changed anything to increment line width
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file never was reformatted by prettier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like the schemas
folder is not included in the prettier scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the file was never formatted, when I first opened it there were 19 ESLint violations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a separate message explaining that !
should not be used and why when it's used.
It should disallow !
independent of the expected
value.
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
hey @sokra, I resolved some conflicts, does it look ok to be merged now? Also, what would be the right place for docs update? Should we add a warning in all related places (eg. |
What kind of change does this PR introduce?
bugfix
Did you add tests for your changes?
yes
If relevant, link to documentation update:
Summary
Throw validation error when
!
was found in a path.Closes #6742, closes #5320.
Does this PR introduce a breaking change?
no
Other information