From 3999e0d52b6a5981601c8cd8b1da3f82f8f131b8 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 4 Apr 2019 22:59:10 +0000 Subject: [PATCH] --- server/AyaNova/biz/WidgetBiz.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/server/AyaNova/biz/WidgetBiz.cs b/server/AyaNova/biz/WidgetBiz.cs index 72e4634f..eaf3691f 100644 --- a/server/AyaNova/biz/WidgetBiz.cs +++ b/server/AyaNova/biz/WidgetBiz.cs @@ -406,12 +406,28 @@ namespace AyaNova.Biz //Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required //validate users choices for required non custom fields - RequiredFieldsValidator.Validate(this,FormCustomization, proposedObj); + RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj); //validate custom fields CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields); } + //for debug purposes +#if (DEBUG) + //TESTING + //make a fake server error for ui testing purposes + if (proposedObj.Count == 666) + { + AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "Count", "Test field server error"); + } + if (proposedObj.DollarAmount == 666) + { + AddError(ApiErrorCode.INVALID_OPERATION, null, "This is a test of a general server error"); + } + + //TESTING +#endif + return; }