Schema a now "parsed" into C++-validator-objects in a first step and then validation takes place with these objects. Errors are now handled via a user-provided error-handler allowing the user to collect all errors at once or bail out when a certain threshold is reached. Fixes #36 and #8. One (sub-)schema can now be referenced with different URIs. Fixes #9 JSON schema draft 7 is now supported. Fixes #35
29 lines
822 B
JSON
29 lines
822 B
JSON
[
|
|
{
|
|
"description": "validation of IPv6 addresses",
|
|
"schema": {"format": "ipv6"},
|
|
"tests": [
|
|
{
|
|
"description": "a valid IPv6 address",
|
|
"data": "::1",
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "an IPv6 address with out-of-range values",
|
|
"data": "12345::",
|
|
"valid": false
|
|
},
|
|
{
|
|
"description": "an IPv6 address with too many components",
|
|
"data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
|
|
"valid": false
|
|
},
|
|
{
|
|
"description": "an IPv6 address containing illegal characters",
|
|
"data": "::laptop",
|
|
"valid": false
|
|
}
|
|
]
|
|
}
|
|
]
|