This commit is contained in:
2019-03-29 18:49:50 +00:00
parent 76cb70e823
commit 6db14b4a36
2 changed files with 1 additions and 26 deletions

View File

@@ -128,7 +128,7 @@ namespace AyaNova.Api.ControllerHelpers
Error.Details = new List<ApiDetailError>();
foreach (ValidationError v in errors)
{
Error.Details.Add(new ApiDetailError() { Target = v.Target, Message = v.Message, Error = v.Message });
Error.Details.Add(new ApiDetailError() { Target = v.Target, Message = v.Message, Error = v.Code.ToString() });
}
log.LogDebug("BadRequest - Validation error");
}

View File

@@ -1,25 +0,0 @@
namespace AyaNova.Biz
{
public enum ValidationErrorType
{
Now_api_code_2201_RequiredPropertyEmpty = 1,
Now_api_code_2202_LengthExceeded = 2,
Now_api_code_2206_NotUnique = 3,
Now_api_code_2207_StartDateMustComeBeforeEndDate = 4,
Now_api_code_2203_InvalidValue = 5,
Now_api_code_2208_ReferentialIntegrity = 6,
Now_api_code_2030_InvalidOperation = 7,
Now_api_code_2209_NotChangeable=8,
Now_api_code_2205_RequiredPropertyMissing = 9,
Now_api_code_2204_CustomRequiredPropertyEmpty = 10
//!! NOTE - UPDATE api-validation-error-codes.md documentation when adding items
}
}//eons