Comments (6)
Hi @RedHatter, you are right, it's not very helpful in this situation. Thanks for sharing the mitigating approach. I will try and raise it with the author sometime but there are other priorities at the moment, though I am curious why it wasn't just wrapped at the time. There might be some good reason why not.
I'll keep an eye on this issue too to see how requested a change in this area is.
from ajv.
I'll try and find time to fit in a fix on this but have other priorities so I'm also happy to review a PR by someone else.
from ajv.
Sorry @RedHatter but I want to check something. You said that the existing error doesn't show you the failing pattern
but I get an error message like this:
SyntaxError: Invalid regular expression: /^[0-9]{2-4}/: Incomplete quantifier
from ajv.
The exact error message I got was
Uncaught SyntaxError: incomplete quantifier in regular expression
Note that this was in firefox. I didn't check the error message in any other browsers at the time.
from ajv.
Ah I see. It seems in node (at least version 18) you get a more useful message that includes the expression. I'll still keep it in mind because we could include the json schema path of the expression.
from ajv.
Related Issues (20)
- Adding a default additionalProperties: false HOT 6
- useDefaults doesn't work with conditional requires HOT 3
- 'v' pattern flag support, log descriptive errors for invalid (failing to compile) regexp's HOT 2
- contains with maxContains and minContains not behaving as expected HOT 11
- Register custom validator without modifying the input schema HOT 1
- Add `validateSchema` "strict" mode HOT 6
- Is this repo alive? HOT 1
- console.log cannot be used as a default HOT 1
- Replace fast-deep-equal with dequal HOT 1
- Getting "Invalid regular expression /<myRegex>/" error while compiling HOT 1
- Change empty string to `undefined` before validation HOT 3
- Catch Enum Errors value HOT 4
- RE2 integration incorrectly typed HOT 2
- Add `sideEffects: false` flag to `package.json` to allow tree-shaking HOT 5
- Add support for comments inside JSON HOT 3
- serializing Infinity creates invalid JSON HOT 5
- Unexpected behaviour of unevaluatedProperties when used with dependentSchemas HOT 1
- Picking or Omiting Certain Properties From a Schema Definition to make another definition HOT 1
- Replace `uri-js` abandoned dependency HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ajv.