Skip to content

noldoreldar/jquery-validate-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

jquery-validate-bootstrap

Overrides jQuery validator's default settings to show a bootstrap glyphicon inside input elements which have errors. Hides default error message labels and shows a tooltip on the icons instead.

Requirements

  • bootstrap (>= 3.1.1)
  • jQuery (>= 1.9.1)
  • jQuery.Validation (>= 1.10.0)
  • Microsoft.jQuery.Unobtrusive.Validation (>= 3.1.1)

Usage

<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.css" />

...
<script src="/Scripts/jquery.js"></script>
<script src="/Scripts/jquery.validate.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>
<script src="/Scripts/bootstrap.js"></script>
...
...
<script src="/Scripts/jquery.validation.bootstrap.js"></script>

<script>
    $.validator.applyBootstrap();
    $("#form1").validate(); // You don't need this line if you enabled Client Side Validation for ASP.NET MVC and using HtmlHelpers on a Model 
</script>

About

jquery.validate.bootstrap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published