I hope you're all doing well and having a good festive season. I wanted to post a question to find out how I can display the errors for a particular form in Laravel 5.1 based on what submit button has been clicked. Here is some code to give a better explanation of what I'm trying to do.
<form action="{{ url( '/auth/login' ) }}" id="login" method="post">
@if (count($errors) > 0)
<div class="show validation-summary">
... display error container only when the login submit button has been clicked
</div>
@endif
<input name="submit" type="submit" value="Login" />
</form>
<form action="{{ url( '/auth/register' ) }}" id="register" method="post">
@if (count($errors) > 0)
<div class="show validation-summary">
... display error container only when the register submit button has been clicked
</div>
@endif
<input name="submit" type="submit" value="Register" />
</form>
Currently both validation divs are displaying when clicking the Login or Register submit buttons, but I only want to display the validation div which relates to that form that was submitted.
</div>