This commit is contained in:
2019-04-04 22:59:10 +00:00
parent 6e3696f133
commit 3999e0d52b

View File

@@ -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;
}