Comments (7)
Additionally: if instead of using validate
we use validateSync
, the problematic statements also fail, differently:
// the following does not throw error, but returns undefined
res = yupSchemaFull.validateSync({ text: 's', ab: { a: 'x', b: 'z' } });
// same: should throw exception, but returns undefined
res = expect(() => yupSchemaFull.validateSync({ text: 's', ab: { a: 'x', b: 'too long' } })).toThrow(Error);
from json-schema-yup-transform.
Update: it all works as expected if I revert yup to version "0.29.1"
Update2: it works until yup 0.29.3 , it breaks at yup 0.30.0
(the culprit -wild guess- might be jquense/yup@dcae108 )
from json-schema-yup-transform.
@leonbloy v0.29.3 introduced breaking changes that are incompatible with this library.
from json-schema-yup-transform.
@leonbloy v0.29.3 introduced breaking changes that are incompatible with this library.
(You probably meant v 0.30.0 - released in Nov 2020)
Well, then what? If this library is incompatible with the latest yup releases (that should documented prominently), are there plans to fix that?
from json-schema-yup-transform.
Added the yup version this package supports in README here.
I may look to rewrite this library to be forward compatible, but that requires time and frankly, this was written for a work project in which I am no longer involved.
Feel free to raise a PR to make it compatible or fork the code and make changes to suit your needs.
from json-schema-yup-transform.
@leonbloy 2.0.0-beta.0 has just been published that supports yup v0.32.11
.
from json-schema-yup-transform.
2.0.0-beta.0 has just been published that supports yup v0.32.11.
It's been 11 months since that beta. Meanwhile several fixes have been released to the main branch (which, it seems, were not merged to that beta branch). Also, a few days ago yup has released version 1.0. Are there any plans to merge and release a non beta version, compatible with yup latest version?
from json-schema-yup-transform.
Related Issues (20)
- Custom error message not working for strings HOT 3
- Conditionally requiring fields using `oneOf` HOT 1
- Conditional in object. HOT 2
- Retrieve the Yup schema HOT 1
- Invalid date-time format regex HOT 1
- Not required enum throws validation error on "" and undefined. HOT 1
- Support of internalization HOT 1
- if/then validation help HOT 2
- IF else then test HOT 3
- Second properties in else conditional HOT 1
- cannot parse type: ["string", "null"] and type:["object", "null"] HOT 2
- nullable: true (OAS3 Support?) HOT 3
- Issue with enums HOT 3
- JSON to Build a Schema & Config with Nested Arrays of Objects?
- Error on import of json-schema-yup-transform HOT 3
- required?.join is not a function HOT 6
- allOf property HOT 2
- How to have a conditional validate on multiple values
- Bug: Incorrectly transformed schema with "if" and "contains"
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 json-schema-yup-transform.