Пример #1
0
 internal WebApiResult ValidationError(string statusText, bool addPleaseCorrectTheFollowingErrorsPrefix)
 {
     return(new WebApiResult(
                HttpStatusCode.BadRequest,
                new ErrorDetails(ValidationException.FormatMessage(statusText, addPleaseCorrectTheFollowingErrorsPrefix))
                ));
 }
Пример #2
0
 /// <summary>
 /// Used for validation errors
 /// </summary>
 internal WebApiResult ValidationError(IEnumerable <string> errors, bool addPleaseCorrectTheFollowingErrorsPrefix)
 {
     return(ValidationError(ValidationException.FormatMessage(errors, addPleaseCorrectTheFollowingErrorsPrefix), false));
 }
Пример #3
0
 /// <summary>
 /// Used for validation errors
 /// </summary>
 internal WebApiResult ValidationError(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary model, bool addPleaseCorrectTheFollowingErrorsPrefix, bool basicHtmlFormatting)
 {
     return(ValidationError(ValidationException.FormatMessage(model, addPleaseCorrectTheFollowingErrorsPrefix, basicHtmlFormatting), false));
 }