GithubHelp home page GithubHelp logo

bt-validate's Introduction

这是一个基于bootstrap的检验组件,改编自网络。 利用了bootstrap的popover弹出组件
显示出错信息,允许用户在表单组件中使用自定义验证规则。没有考虑 通过ajax方式
服务器返回的验证信息情况。 用户在ajax下,可通过 类似的语法进行设置显示:
el.next().popover("show");  至于其他,请按js操作dom节点的方式修改popover的
显示内容

使用:

1 引入 jQuery 和 Bootstrap 库,

2  然后绑定需要验证的表单 $('#form').validation()
  例:
	<script type="text/javascript">
		$('#zedit').validation();
	</script>

3 表单中两种使用 示例:
  <input  type="text"  btvd-type="mail"
	 btvd-class='btvdclass' 	btvd-err="data-邮箱格式不正确!"   >    
 上面,使用了js组件中 预定义的mail验证、自定义了popover对话框的样式、自定义出错信息

	<input  type="text" placeholder="a…" btvd-el='/^[0-9]\d*$/' 
		btvd-class='btvdclass' btvd-err="data-必须输入数字!" 
	>   
  上面中,用户使用了自已的正则验证、自定义了popover对话框的样式、自定义出错信息。
  

原作者见:
[Validation-for-Bootstrap](http://fatesheep.github.com/Validation-for-Bootstrap/)

本地址见:
https://github.com/yunhaifeiwu/bt-validate/

bt-validate's People

Contributors

yunhaifeiwu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.