parent
553aae8097
commit
9432451a84
|
@ -43,7 +43,7 @@ Example. `constant` keyword from version 5 proposals (that is equivalent to `enu
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
ajv.addKeyword('constant', { validate: function (schema, data) {
|
ajv.addKeyword('constant', { validate: function (schema, data) {
|
||||||
return typeof schema == 'object && schema !== null'
|
return typeof schema == 'object' && schema !== null
|
||||||
? deepEqual(schema, data)
|
? deepEqual(schema, data)
|
||||||
: schema === data;
|
: schema === data;
|
||||||
}, errors: false });
|
}, errors: false });
|
||||||
|
|
Loading…
Reference in New Issue