Base solution for your next web application
Open Closed

ValidationResult #4650


User avatar
0
haytham created

Hello How can read/catch ValidationResult in void OnException(ExceptionContext context)

thanks


3 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team
    if (context.Exception is AbpValidationException)
    {
        // ...
    }
    

    ASP.NET Core: Implement IExceptionFilter, e.g. AbpExceptionFilter MVC5: Available in controller, e.g. AbpController

  • User Avatar
    0
    haytham created

    thanks for your reply but how to read the message from ValidationResult

  • User Avatar
    0
    alper created
    Support Team

    <a class="postlink" href="https://stackoverflow.com/questions/12552687/get-error-message-when-using-custom-validation-attribute">https://stackoverflow.com/questions/125 ... -attribute</a>