在线演示地址:http://www.shouce.ren/study/api/s/jq--BootstrapValidator--index.html
使用方法,代码如下所示:
1.<form id="defaultForm" method="post" class="form-horizontal" action="target.php">
2. <div class="form-group">
3. <label class="col-lg-3 control-label">用户名</label>
4. <div class="col-lg-5">
5. <input type="text" class="form-control" name="username" />
6. </div>
7. </div>
8.
9. <div class="form-group">
10. <label class="col-lg-3 control-label">邮箱</label>
11. <div class="col-lg-5">
12. <input type="text" class="form-control" name="email" />
13. </div>
14. </div>
15.
16. <div class="form-group">
17. <label class="col-lg-3 control-label">生日</label>
18. <div class="col-lg-5">
19. <input type="text" class="form-control" name="birthday" /> (YYYY/MM/DD)
20. </div>
21. </div>
22.
23. <div class="form-group">
24. <div class="col-lg-9 col-lg-offset-3">
25. <button type="submit" class="btn btn-primary" name="signup" value="Sign up">提交</button>
26. <button type="button" class="btn btn-info" id="validateBtn">自动验证</button>
27. <button type="button" class="btn btn-info" id="resetBtn">重置表单</button>
28. </div>
29. </div>
30.</form>
1.$('#defaultForm').bootstrapValidator({
2. message: 'This value is not valid',
3. feedbackIcons: {
4. valid: 'glyphicon glyphicon-ok',
5. invalid: 'glyphicon glyphicon-remove',
6. validating: 'glyphicon glyphicon-refresh'
7. },
8. fields: {
9. username: {
10. message: 'The username is not valid',
11. validators: {
12. notEmpty: {
13. message: 'The username is required and cannot be empty'
14. },
15. stringLength: {
16. min: 6,
17. max: 30,
18. message: 'The username must be more than 6 and less than 30 characters long'
19. },
20. regexp: {
21. regexp: /^[a-zA-Z0-9_\.]+$/,
22. message: 'The username can only consist of alphabetical, number, dot and underscore'
23. },
24. remote: {
25. url: 'remote.php',
26. message: 'The username is not available'
27. },
28. different: {
29. field: 'password',
30. message: 'The username and password cannot be the same as each other'
31. }
32. }
33. },
34. email: {
35. validators: {
36. emailAddress: {
37. message: 'The input is not a valid email address'
38. }
39. }
40. },
41. }
42.});
以上所述是小编给大家介绍的Bootstrap Validator 表单验证的全部叙述,希望对大家有所帮助,如果大家想了解更多内容敬请关注!
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
白云城资源网 Copyright www.dyhadc.com
暂无“Bootstrap Validator 表单验证”评论...
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
更新日志
2025年10月28日
2025年10月28日
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]
