javascript - 1000hz Bootstrap validation is not working properly -


i implementing validation using 1000hz bootstrap validation. going except 2 things-

1). data-match not working when enter both passwords same. here code-

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script src="../js/bootstrap.min.js"></script> <script type="text/javascript" src="../js/login-reg.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.9.0/validator.min.js"></script>  <div class="form-group">   <input type="password" name="inputpassword" data-minlength="6" id="password" tabindex="1" class="form-control" placeholder="password" value="" required>   <div class="help-block">minimum of 6 characters</div> </div> <div class="form-group has-feedback">   <input type="password" name="confirm-password" id="confirm-password" tabindex="1" class="form-control" placeholder="confirm password" value="" data-match="#inputpassword" data-match-error="whoops, these don't match" required>   <span class="glyphicon form-control-feedback"></span>   <div class="help-block with-errors"></div> </div> <div class="form-group">   <div class="row">    <div class="col-sm-6 col-sm-offset-3">     <input type="submit" name="register-submit" id="register-submit" tabindex="4" class="form-control btn btn-register" value="register now">    </div>   </div> </div> 

i googled , got question referring similar issue here. looked @ solution provided 1000hz, on same page, , checked code can't resolve issue. please tell me doing wrong?

2). validates email correct when type example@gmail (this much). shouldn't validate .com too?

<div class="form-group">    <input type="email" name="email" id="email" tabindex="1" class="form-control" placeholder="email" value="" data-error="email address invalid" required>    <div class="help-block with-errors"></div> </div> 

i mean email address example@gmail.com has 3 main parts- before @, some text after @and .com in end. when type example@ shows "email invalid", agree moment type example@g no alert shown. correct way validate email address? or talking sense? correct way validate email address?

ps- please go on website , try writing example@ , example@g.

1) wrote
data-match="#inputpassword"

but "#" sign corresponds id of element, not name. not sure in case, it's worth checking.

2) email validation quite hard perform correctly, , basic checks there "@" sign somewhere in middle of string . have perform other checks (like if there .com) yourself, more advanced framework or custom scripts (or back-end), sorry !

edit : source last claim : http://formvalidation.io/validators/emailaddress/#is-ab-valid-email-address


Comments