Beispiel #1
0
 internal WebApiResult ValidationError(string statusText, bool addPleaseCorrectTheFollowingErrorsPrefix)
 {
     return(new WebApiResult(
                HttpStatusCode.BadRequest,
                new ErrorDetails(ValidationException.FormatMessage(statusText, addPleaseCorrectTheFollowingErrorsPrefix))
                ));
 }
Beispiel #2
0
 /// <summary>
 /// Used for validation errors
 /// </summary>
 internal WebApiResult ValidationError(IEnumerable <string> errors, bool addPleaseCorrectTheFollowingErrorsPrefix)
 {
     return(ValidationError(ValidationException.FormatMessage(errors, addPleaseCorrectTheFollowingErrorsPrefix), false));
 }
Beispiel #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));
 }