From 4e7c88ff0aa4e0e18afca264b1ab739053802bd7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 17 Jul 2019 22:57:51 +0000 Subject: [PATCH] --- server/AyaNova/biz/FormCustomBiz.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/AyaNova/biz/FormCustomBiz.cs b/server/AyaNova/biz/FormCustomBiz.cs index fe99259e..52421e4e 100644 --- a/server/AyaNova/biz/FormCustomBiz.cs +++ b/server/AyaNova/biz/FormCustomBiz.cs @@ -217,6 +217,13 @@ namespace AyaNova.Biz AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "Template", $"Template array item {i}, \"hide\" property value of \"{fieldHideValue}\" is not valid, this field is core and cannot be hidden"); } + //validate if it's a custom field that it has a type specified + if (MasterFormField.Custom && formFieldItem["type"]==null){ + AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "Template", $"Template array item {i}, \"type\" property value is MISSING for custom filed, Custom fields MUST have types specified"); + } + + + if (formFieldItem["type"] != null) { if (!MasterFormField.Custom)