Working Example see whether this is use-full...
<html>
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://jquery.bassistance.de/validate/demo/site-demos.css">
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="http://jquery.bassistance.de/validate/jquery.validate.js"></script>
<script src="http://jquery.bassistance.de/validate/additional-methods.js"></script>
<script type="text/javascript">
jQuery.validator.addMethod("lettersonly", function(value, element) {
return this.optional(element) || /^[a-z]+$/i.test(value);
}, "Letters only please");
jQuery.validator.setDefaults({
debug: true,
success: "valid"
});
$(function(){
$('#myForm').validate({
rules: {
myPrice:{
required: true,
lettersonly: true
//number: false
//denominationCheck:true
}
}
});
$('#submit').click(function(){
if($('#myForm').valid())
{
//doAjax
}else{
alert("invalid credentials");
}
});
});
</script>
</head>
<body>
<form id="myForm">
<input id="myPrice" type="text" name="myPrice" style="float: left;"/><br>
<button id="submit">Validate!</button>
</form>
</body>
</html>