I'm using Twitter's Bootstrap. After the user enters data in my form, they click a button to register. This loads a modal with a summary of the data they entered for them to confirm. I want to validate the data after they click register, but before the modal loads. How do I do that?
This is one of my form elements
<div class="control-group">
<label class="control-label" for="inputEmail">Email</label>
<div class="controls">
<input id="inputEmail" class = "span11" type="text" placeholder="Email" name = "inputEmail" maxlength="32">
</div>
This loads the modal
<div class="control-group">
<div class="controls">
<a href="#myModal" role="button" class="btn" id="registerBtn" data-toggle="modal">Register</a>
</div>
Thanks