1 bootstrapValidator使用
1 如何使用
引入
$("#divDataArea").bootstrapValidator({
message: 'This value is not valid',
live: 'enabled',
excluded: ':disabled',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
// WarrantIssued
TotalAssetsBid: {
message: 'TotalAssetsBid should be number',
validators: {
stringLength: {
min: ,
max: ,
message: 'lenght should be between 2 and 10.'
}
}
},
WarrantIssued: {
message: 'WarrantIssued should be number',
trigger:'change',
validators: {
stringLength: {
min: ,
max: ,
message: 'lenght should be between 2 and 10.'
}
}
}
}
});
var bootstrapValidator = $("#divDataArea").data("bootstrapValidator");
bootstrapValidator.validate();
var valid = bootstrapValidator.isValid();
if (valid == false) {
return;
}
1 bootstrapValidator使用的更多相关文章
- bootstrapvalidator+bootstrap-select select无法校验问题解决方法
$("#form_user_input") .bootstrapValidator( { message : 'This value is not valid', excluded ...
- Bootstrap表单验证插件bootstrapValidator使用方法整理
插件介绍 先上一个图: 下载地址:https://github.com/nghuuphuoc/bootstrapvalidator 使用方法:http://www.cnblogs.com/huangc ...
- JS组件系列——Form表单验证神器: BootstrapValidator
前言:做Web开发的我们,表单验证是再常见不过的需求了.友好的错误提示能增加用户体验.博主搜索bootstrap表单验证,搜到的结果大部分都是文中的主题:bootstrapvalidator.今天就来 ...
- bootstrapvalidator校验、校验清除重置
//保存 function saveAdmin(){ //开启验证 $('#saveadmin_form').data('bootstrapValidator').validate(); if(!$( ...
- bootstrapValidator.js,最好用的bootstrap表单验证插件
前言:做Web开发的我们,表单验证是再常见不过的需求了.友好的错误提示能增加用户体验.博主搜索bootstrap表单验证,搜到的结果大部分都是文中的主题:bootstrapvalidator.今天就来 ...
- jQuery 实现bootstrapValidator下的全局验证
前置: 引入jQuery.bootstrap.bootstrapValidator 问题描述: 项目中要求所有的表单输入框中都不能输入&符号.没有在bootstrap中找到有方法可用,只能自己 ...
- bootstrapValidator.js 做表单验证
有这样的一个场景,我们在提交form表单的时候 可能要做一些验证,比如判断是不是为空,电话的格式验证,邮箱的格式验证等等,手写起来也是可以得. 但是今天我介绍一个bootstrap插件简化开发.就是b ...
- 【bootstrapValidator 不验证】使用bootstrapValidator 验证效果不起作用
虽然在页面ready的时候 就绑定了验证表单 ,但是在点击提交按钮之后 依旧没有验证的效果 . 那就在提交按钮的点击事件中 添加一句话: $(document).ready( function () ...
- bootstrap-validator验证问题总结
bootstrap-validator是一个优秀的验证器,使用中遇到如下问题,总结如下: 1.<button type="submit" name="submit2 ...
- BootstrapValidator验证表单用法
引入文件 <link rel="stylesheet" href="css/bootstrap.css"/> <link rel=" ...
随机推荐
- vue2.0+vue-video-player实现hls播放的案例
1. 安装依赖. npm install vue-video-player --save 2. 在main.js引入vue-video-player. import VueVideoPlayer fr ...
- kotlin委托属性
fun main(arg: Array<String>) { val myClass1 = myClass1() myClass1.name="mycalsss1" v ...
- php操作成功返回当前页并刷新
echo "<script>alert('操作成功');location.href='".$_SERVER["HTTP_REFERER"].&quo ...
- quartz.net 学习
目录 简介 Quartz是什么? Quartz的应用场景Quartz的安装 安装 源码Hello World范例API 核心API Scheduler接口: Job接口 J ...
- 免费的HTML5版uploadify
转http://www.cnblogs.com/lvdabao/p/3452858.html var defaults = { fileTypeExts:'',//允许上传的文件类型,格式'*.jpg ...
- mfc递归删除文件夹
BOOL myDeleteDirectory(CString directory_path) //删除一个文件夹下的所有内容 { BOOL ret=TRUE; CFileFind finder; CS ...
- 读写Session
读写Session Session是保存在服务端的字典 Session与Cookie有些类似,都是通过字典管理key-value对,只不过Cookie是保存在客户端的字典,而Session是保存在服务 ...
- gitlab安装、下载、推送 代码(推荐)
环境: 内存必须5G以上 centos7.5 服务端:192.168.0.74 客户端:192.168.0.73 GitLab的安装 1.在CentOS系统上,下面的命令将会打开系统防火墙HTTP和S ...
- 一个老程序员PHP程序员说的话(用来提醒自己)
我,一个老程序员,也是一个学生,把玩过甚多语言,大多不精.我既非名牌学校,也不是高学历,仅代表一部分比较蛋疼的人.接触PHP也是很早了,从04年的OFSTAR开始的,到现在六年了,期间也接触过不少的语 ...
- effective java(第三版)---读书笔记
第一章 引言 < Effective Java>这本书并不厚,而且并不适合初学者,适合有一定的工作经验的java攻城狮.这本书不是百科全书式的JAVA 手册,而是试图在讲述如何正确.高效地 ...