I am confused with the implementation of Boottrap 3 validation. I am new to Bootstrap and I cannot get the validation form to work with a form that does not include a submit button. The type of form validation I'm looking for can be seen with this code:
http://jsfiddle.net/hTPY7/1107/
<form> <div class="form-group"> <label class="control-label" for="username">Email:</label> <div class="input-group"> <input class="form-control" placeholder="Email" name="email" type="email" required /> </div> </div> <div class="form-group"> <label class="control-label" for="password">Password:</label> <div class="input-group"> <input class="form-control" type="password" placeholder="Password" name="lastname" type="text" required /> </div> </div> <button type="submit" class="btn btn-primary">Submit</button> </form>
I know that I can submit the form using some jQuery, for example, the code below, but how can I use Bootstrap 3 validation?
$( "#createUserSubmit" ).click(function() { $( "#newUserForm" ).submit(); });
I read Stackoverflow for years, but this is my first post. I searched for answers, but all I can find are solutions that use other validation libraries. I would like to use Bootstrap's own built-in functions.
Thanks!
javascript jquery validation forms twitter-bootstrap-3
Veita
source share