This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user