Comments (6)
@shahzeb79 If you have mentioned person.name
as required in your schema, the target would need to have person field. As the person.name
field's existence cannot be verified if person
itself is not present.
The parent field cannot be skipped to check nested child's required check. It can only be done by removing required field from the nested field.
What is needed I believe is another property like requiredIfParentExist: true
. I would mark it as a feature request that can be added in next release.
from schema-validator.
Thanks alot. It will be good as i have alot of cases where it should be existing only if parent exist.
from schema-validator.
Hi @ketanTechracers ,
Do we have any timeline when you could add this feature?
from schema-validator.
@shahzeb79 Planning to add it by June end.
from schema-validator.
Hi, do you have any progress on it?
from schema-validator.
I'm also interested in this feature. Are there any plans to continue support of this great package? Thanks a lot!
from schema-validator.
Related Issues (13)
- Logging should be optional HOT 2
- how to validate array of elements? HOT 5
- Validate Regex? HOT 3
- mocha --opts not working anymore HOT 8
- Compare an object structure directly with another object HOT 1
- Wildcard parent
- Using with yargs, it overrides options HOT 2
- CLI: return a nonzero status when validation fails HOT 1
- `Schema` - ReferenceError: Schema is not defined HOT 2
- validateSchema() will always returns Errors+Warnings list irrespective of what log level is set
- Unable to run `schema` on MacOS due to wrong line endings
- Bug in validate dependency (validation of required fields of optional objects)
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 schema-validator.