✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Soit le schéma suivant. Quelles instances sont valides ?
{
"type": "object",
"properties": {
"pays": { "type": "string" },
"cp": { "type": "string" }
},
"if": { "properties": { "pays": { "const": "FR" } },
"required": ["pays"] },
"then": { "required": ["cp"],
"properties": { "cp": { "pattern": "^[0-9]{5}$" } } }
}