js-schema icon indicating copy to clipboard operation
js-schema copied to clipboard

Simple and intuitive schema validator

Results 21 js-schema issues
Sort by recently updated
recently updated
newest added

Hi, looking through the issues and PR I get the impression that this project has been abandoned for a while. If this is the case, Is there an active fork...

Install package ```npm install js-schema``` after in index.js ```js import schema from 'js-schema'; // or import * as schema from 'js-schema'; ``` When i try run in ``` schema is...

There are 4 outstanding PRs that seem quite old, and apparently no activity for almost two years. Is this orphanware, has further development moved somewhere else, or is the hiatus...

Following TypeScript code ``` import {Schema} from 'js-schema'; import schema from 'js-schema'; let obj: Schema = schema({ foo: String, bar: String }); ``` is transpiled into followin JS code ```...

Solution for https://github.com/molnarg/js-schema/issues/43. Adds support for `Function.custom()` which accepts a user-defined function and passes it the field value, expecting an object to be returned with the fields `valid` and `msg`....

before: ``` var NothingSchema = module.exports = Schema.patterns.NothingSchema = Schema.extend({ errors: function (instance) { return false }, ``` after: ``` var NothingSchema = module.exports = Schema.patterns.NothingSchema = Schema.extend({ errors: function...

For example, if we ```checker = schema({ a: 1 })``` then we do ```checker(123)``` checker will throw ```TypeError: Cannot use 'in' operator to search for 'type' in 123```

How do we force strict mode on the schemas ? Meaning that unspecified keys are unauthorized ? Thanks a lot

The following schema ``` javascript schema({ a: [Function, String], b: String, c: Array.of(3, String), d: Array.of(3, String), e: [null, schema.self] }) ``` will never pass on object without the e...