Comments (3)
I am not sure if revalidator can handle array as root item. But I know that the lib https://github.com/litixsoft/lx-valid can do it. Here is the schema:
const schema = {
type: 'array',
items: {
type: 'object',
properties: {
type: {
type: 'string'
},
value: {
type: 'string'
}
}
}
};
from revalidator.
+1 to this. I need to validate that an object contains an array and this doesn't work for that use case at all.
from revalidator.
Was this ever solved for revalidator library?
from revalidator.
Related Issues (20)
- source missing license header HOT 1
- allowEmpty true, minLength > 0 throws a validation error HOT 2
- Crashes when 'additionalProperties' is a schema. HOT 1
- Object validation throwing error HOT 1
- ensure property is not present
- undefined passes enum test HOT 2
- Can lock up system with malicious email strings
- Input for type 'number' divisibleBy issue (2.99 not divisible by 0.01)
- Validation array of objects
- Validate key without making it required?
- type validation with object throws error message
- It doesn't really check if the value passed is an object
- Decimal Digits validation fails with type number
- Validating a revalidator schema
- Maintaining revalidator HOT 4
- security contact
- GHSL-2020-352: seeking security contact for your project
- Export types and interfaces
- vulnerability in revalidator
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 revalidator.