This commit is contained in:
@@ -62,7 +62,7 @@ namespace AyaNova.Biz
|
||||
//
|
||||
FormCustom outObj = inObj;
|
||||
|
||||
outObj.Template=JsonUtil.CompactJson(outObj.Template);
|
||||
outObj.Template = JsonUtil.CompactJson(outObj.Template);
|
||||
|
||||
await ct.FormCustom.AddAsync(outObj);
|
||||
await ct.SaveChangesAsync();
|
||||
@@ -115,7 +115,7 @@ namespace AyaNova.Biz
|
||||
if (HasErrors)
|
||||
return false;
|
||||
|
||||
dbObj.Template=JsonUtil.CompactJson(dbObj.Template);
|
||||
dbObj.Template = JsonUtil.CompactJson(dbObj.Template);
|
||||
|
||||
//Log modification
|
||||
EventLogProcessor.LogEventToDatabase(new Event(UserId, dbObj.Id, BizType, AyaEvent.Modified), ct);
|
||||
@@ -218,7 +218,8 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
//validate if it's a custom field that it has a type specified
|
||||
if (MasterFormField.Custom && formFieldItem["type"]==null){
|
||||
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");
|
||||
}
|
||||
|
||||
@@ -238,7 +239,7 @@ namespace AyaNova.Biz
|
||||
|
||||
}
|
||||
|
||||
TODO: why is required required if it's just a regular field being hidden?
|
||||
//other code depends on seeing the required value even if it's not set to true
|
||||
if (formFieldItem["required"] == null)
|
||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, "Template", $"Template array item {i}, object is missing required \"required\" property ");
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ namespace AyaNova.Util
|
||||
},
|
||||
{
|
||||
""fld"": ""WidgetSerial"",
|
||||
""required"": ""false"",
|
||||
""hide"": ""true""
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user