From 30e7eb2db8ff81a0342d11d3a20ec6f421df6727 Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Thu, 27 Oct 2022 16:48:27 +0200 Subject: [PATCH] field validator required, allowZero --- schemas/api-config/field.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/schemas/api-config/field.json b/schemas/api-config/field.json index a97a5f5..12f1ba1 100644 --- a/schemas/api-config/field.json +++ b/schemas/api-config/field.json @@ -61,7 +61,16 @@ "validator": { "type": "object", "description": "field validator", + "additionalProperties": false, "properties": { + "required": { + "type": "boolean", + "description": "force field as required" + }, + "allowZero": { + "type": "boolean", + "description": "allow for required fields that the value can be an empty string or 0 for number type" + }, "eval": { "type": "string", "description": "javascript validator which failes if evaluates to false or string as error message, with following variables: $this, $parent, $stack, $auth, context"