Tools, FAQ, Tutorials:
Multiple JSON Schema Validation Keywords
How multiple Validation Keywords work in JSON Schema?
✍: FYIcenter.com
Multiple Validation Keywords work in JSON Schema with the "AND" logic.
The order of validation keywords is not important.
In other words, all of them are applied individually to the JSON instance based their specified conditions.
For example, the following schema requires the JSON instance must a JSON String AND match the given regular expression pattern:
JSON Schema: { "pattern": ".*@.*", "type": "string", "minLength": 15 } {"enum": ["YES", "NO"]} Valid JSON instance: help@fyicenter.com Invalid JSON instance: "to@bbc.com" Invalid JSON instance: 3.1415926535897932384626433
2017-08-25, 326👍, 0💬
Popular Posts:
Where to find tutorials on RSS specifications? I want to learn it to describe my API services. Here ...
How To Create a Directory in PHP? You can use the mkdir() function to create a directory. Here is a ...
How To Copy Array Values to a List of Variables in PHP? If you want copy all values of an array to a...
Where to find tutorials on how to Read and Write Files in PHP? A collection of tutorials to answer m...
Where to find tutorials on how to use PHP built-in functions to manage arrays? A collection of tutor...