Skip to content

Conversation

@claudiodekker
Copy link
Contributor

@claudiodekker claudiodekker commented Sep 1, 2020

Added

Fixed

Remaining / newly found issues

There's a few solutions to this that I can tell, and neither of them aren't really pretty:

  • Extend the Application's ExceptionHandler, then swap it out in the container. This will allow us to intercept the ValidationException and re-format the messages.

  • Swap out the Validator for our own, so we can throw a custom ValidationException.

  • Tell the user to add a call to their Application's ExceptionHandler, so we don't have to override/extend any core-logic (less maintenance, more work for the end-user)

@reinink reinink merged commit 458366a into inertiajs:validation-errors Sep 5, 2020
@reinink
Copy link
Member

reinink commented Sep 5, 2020

Thanks so much for your help here @claudiodekker! I've simplified things a little, but the concept was right. 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants