sever if then

ajv Валидация по условию, зависимые поля. Несколько if then

const validate = ajv.compile(
    {
        type: "object",
        "properties": {
            "name": {
                type: "string",
                maxLength: 15,
                "isNotEmpty": true,
            },
            "email": { type: "string", format: "email" },
            "count": { type: "number", },
            "price": { type: "number", },
        },
        required: ["name"],
        "allOf": [
            {
                "if": {
                    "properties": { "deliveryType": { const: deliveryTypes.CITY.value } } 
                },
Subscribe to RSS - sever if then