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