Search code examples
asp.net-mvcpost-redirect-get

Is there a name for the PRG pattern that doesn't redirect on failed validation?


My website follows the Post-Redirect-Get pattern.
There seems to be 2 ways to deal with failed validation. Either:

  • Render the page with validation messages
  • Temporarily store the validation messages, and redirect to a GET that shows the messages

Do both of these implementations follow the PRG pattern?
Is there a more specific way to describe either of these patterns?

I am asking primarily for educational sake.


Solution

  • Since no one has answered, I'm going to suggest my own answer.

    PRG Strict means that the POST redirects even if there is a validation error. It temporarily stores the validation messages, redirects to the same URL, and displays the validation messages.

    PRG Loose means that the POST does not redirect when there are validation errors. The form will be redisplayed, along with the error messages.

    How does this sound?