I need to validate the inputs of a form. I'm working with JSP, javascript and html codes. The system is expected to work like this: The person buys and has the buying steps. In the first stage, the person places the quantity, then clicking the "Continue" button, he must validate if the user has filled that quantity field, otherwise he will not let go to the next step. I tried doing this with form and it did not work very well. Is it possible to do this validation by javascript or some command inside the html?
Code
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#step1" data-toggle="tab" aria-controls="step1" role="tab" title="" data-original-title="PRODUTO" aria-expanded="true">
<span class="round-tab">
<p align="center"><img src="images/p1.png" height="60" width="60"></p>
</span>
</a>
</li>
<li role="presentation" class="disabled">
<a href="#step2" data-toggle="tab" aria-controls="step2" role="tab" title="" data-original-title="ENVIO" aria-expanded="false">
<span class="round-tab">
<p align="center"><img src="images/p2.png" height="60" width="60"></p>
</span>
</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" role="tabpanel" id="step1">
<div class="step1">
<div class="row">
<div class="preview col-md-6">
<p align="center"><img src="images/xbox.png" height="300" width="200"></p>
</div>
<div class="col-xs-5">
<h2>Dados do Produto</h2>
<table style="width:100%">
<tr>
<td>Produto</td>
<td><%=anuncio.getTitulo()%></td>
</tr>
<tr>
<td>Qtd. disponivel: </td>
<td><%=anuncio.getQuantidade()%></td>
</tr>
<tr>
<td>Qtd. desejada: </td>
<td><input type="text" id="quantity" name="quantity" value="1" disabled="disabled" size="4" required></td>
</tr>
<tr>
<td>Valor Unitario: </td>
<td><%=anuncio.getPreco()%></td>
</tr>
</table>
<ul class="list-inline pull-right">
<li><input type="button" class="btn btn-primary next-step" value="CONTINUAR"></li>
</ul>
</div>
</div>
</div>
</div>
</div>