[jQuery Validation Plugin](https://jqueryvalidation.org/) - Form validation made easy
================================
[![Build Status](https://secure.travis-ci.org/jquery-validation/jquery-validation.svg)](https://travis-ci.org/jquery-validation/jquery-validation)
[![devDependency Status](https://david-dm.org/jquery-validation/jquery-validation/dev-status.svg?theme=shields.io)](https://david-dm.org/jquery-validation/jquery-validation#info=devDependencies)
The jQuery Validation Plugin provides drop-in validation for your existing forms, while making all kinds of customizations to fit your application really easy.
## Getting Started
### Downloading the prebuilt files
Prebuilt files can be downloaded from https://jqueryvalidation.org/
### Downloading the latest changes
The unreleased development files can be obtained by:
1. [Downloading](https://github.com/jquery-validation/jquery-validation/archive/master.zip) or Forking this repository
2. [Setup the build](CONTRIBUTING.md#build-setup)
3. Run `grunt` to create the built files in the "dist" directory
### Including it on your page
Include jQuery and the plugin on a page. Then select a form to validate and call the `validate` method.
```html
<form>
<input required>
</form>
<script src="jquery.js"></script>
<script src="jquery.validate.js"></script>
<script>
$("form").validate();
</script>
```
Alternatively include jQuery and the plugin via requirejs in your module.
```js
define(["jquery", "jquery.validate"], function( $ ) {
$("form").validate();
});
```
For more information on how to setup a rules and customizations, [check the documentation](https://jqueryvalidation.org/documentation/).
## Reporting issues and contributing code
See the [Contributing Guidelines](CONTRIBUTING.md) for details.
**IMPORTANT NOTE ABOUT EMAIL VALIDATION**. As of version 1.12.0 this plugin is using the same regular expression that the [HTML5 specification suggests for browsers to use](https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address). We will follow their lead and use the same check. If you think the specification is wrong, please report the issue to them. If you have different requirements, consider [using a custom method](https://jqueryvalidation.org/jQuery.validator.addMethod/).
In case you need to adjust the built-in validation regular expression patterns, please [follow the documentation](https://jqueryvalidation.org/jQuery.validator.methods/).
**IMPORTANT NOTE ABOUT REQUIRED METHOD**. As of version 1.14.0 this plugin stops trimming white spaces from the value of the attached element. If you want to achieve the same result, you can use the [`normalizer`](https://jqueryvalidation.org/normalizer/) that can be used to transform the value of an element before validation. This feature was available since `v1.15.0`. In other words, you can do something like this:
``` js
$("#myForm").validate({
rules: {
username: {
required: true,
// Using the normalizer to trim the value of the element
// before validating it.
//
// The value of `this` inside the `normalizer` is the corresponding
// DOMElement. In this example, `this` references the `username` element.
normalizer: function(value) {
return $.trim(value);
}
}
}
});
```
## License
Copyright © Jörn Zaefferer<br>
Licensed under the MIT license.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【资源说明】 1、该资源包括项目的全部源码,下载可以直接使用! 2、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,作为参考资料学习借鉴。 3、本资源作为“参考资料”如果需要实现其他功能,需要能看懂代码,并且热爱钻研,自行调试。 基于Jsp+Servlet实现图书管理系统源码.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于Jsp+Servlet实现图书管理系统源码.zip (634个子文件)
UserInfoDaoImpl.class 4KB
BookServiceImpl.class 4KB
UserInfoInsertServiceImpl.class 4KB
BookDaoImpl.class 4KB
BaseDao.class 3KB
Book.class 3KB
UserInfoSelectServlet.class 3KB
DbUtils.class 3KB
BookSelectServlet.class 3KB
UserLoginServlet.class 3KB
UserInfo.class 2KB
BookBorrowServlet.class 2KB
BookRepayServlet.class 2KB
UserInfoUpdateServlet.class 2KB
BookUpdateServlet.class 2KB
UserInfoDeleteServlet.class 2KB
BookDeleteServlet.class 2KB
UserInfoInsertServlet.class 2KB
BookInsertServlet.class 2KB
UserInfoInsertServiceImplTest.class 2KB
UtfFilter.class 1KB
UserInfoLogOut.class 1KB
UserInfoInsertService.class 467B
BookService.class 448B
UserInfoDao.class 430B
MarkUtils.class 402B
BookDao.class 351B
.classpath 982B
ace.min.css 265KB
bootstrap.css 129KB
bootstrap.css 129KB
bootstrap.min.css 107KB
bootstrap.min.css 107KB
bootstrap.min.css 94KB
font-awesome-ie7.min.css 37KB
ace-rtl.min.css 36KB
ace-skins.min.css 26KB
jquery-ui-1.10.3.full.min.css 24KB
font-awesome.min.css 22KB
bootstrap-theme.css 21KB
bootstrap-theme.css 21KB
bootstrap-editable.css 21KB
stylesheet.css 20KB
select2.css 19KB
bootstrap-theme.min.css 18KB
bootstrap-theme.min.css 18KB
chosen.css 13KB
ui.jqgrid.css 12KB
dropzone.css 11KB
style.css 11KB
fullcalendar.css 11KB
datepicker.css 10KB
screen.css 7KB
ace-ie.min.css 7KB
milk.css 5KB
daterangepicker.css 5KB
colorbox.css 4KB
jquery-ui-1.10.3.custom.min.css 3KB
bootstrap-timepicker.css 3KB
colorpicker.css 2KB
ui.css 2KB
style.css 2KB
jquery.gritter.css 2KB
cmxform.css 1KB
cmxformTemplate.css 1KB
reset.css 850B
dtree.css 795B
core.css 704B
site-demos.css 486B
screen.css 205B
Thumbs.db 13KB
glyphicons-halflings-regular.eot 20KB
glyphicons-halflings-regular.eot 20KB
loading.gif 9KB
logo_marketo.gif 8KB
tab-sprite.gif 5KB
button-submit.gif 4KB
back_green-fade.gif 2KB
login-sprite.gif 2KB
back_nav_blue.gif 2KB
tab_green.gif 2KB
icons.gif 1KB
step3-24.gif 1KB
step1-24.gif 1KB
step2-24.gif 1KB
bg.gif 1KB
globe.gif 1KB
trash.gif 1KB
question.gif 1KB
base.gif 1KB
nolines_plus.gif 870B
nolines_minus.gif 861B
toggle.gif 845B
blank.gif 799B
page.gif 664B
musicfolder.gif 633B
imgfolder.gif 622B
page.gif 582B
loading.gif 418B
folderopen.gif 376B
共 634 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
土豆片片
- 粉丝: 1526
- 资源: 5641
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功