Shopping cart contains html5 quantity validation as show in code below. If clicked in Refresh button, browser shows error message and cancels submit.
If clicked in Checkout button, checkout url is invoked without validation.
How to trigger form validation if Chekcoutr button is pressed and cancel checkout button press if form is invalid.
It is possible to use post request for Checkout button or refactor code to use multiple submit buttons if this helps.
Bootstrap 3, jquery, ASP.NET MVC3, Mono are used.
<form action="/ShoppingCart/Update">
<input type="hidden" value='TOUR33' name='product' />
<input name="quantity" type="number" value="48000" max='1536' min="0" step="24" />
<input type='submit' value='Refresh' />
</form>
<a class="btn btn-success" href="/Checkout/Address">Checkout</a>
<input type="submit"/>instead of<a>?/Checkout/Addressif second submit button is used ? For this url there is no need to post form data. Form data can posted if this makes solution easierform