lay-verify
lay-verify:是表单验证的关键字
required (必填项)
phone(手机号)
email(邮箱)
url(网址)
number(数字)
date(日期)
identity(身份证)
自定义值
支持多条规则的验证
lay-verify="required|phone|number"
自定义验证
$ = layui.jquery;
var form = layui.form, layer = layui.layer;
//自定义验证规则
form.verify({
nikename: function (value) {
if (value.length < 5) {
return '昵称至少得5个字符啊';
}
},
pass: [/(.+){6,12}$/, '密码必须6到12位'],
repass: function (value) {
if ($('#L_pass').val() != $('#L_repass').val()) {
return '两次密码不一致';
}
}
});
lay-verify的更多相关文章
- [LeetCode] Verify Preorder Serialization of a Binary Tree 验证二叉树的先序序列化
One way to serialize a binary tree is to use pre-oder traversal. When we encounter a non-null node, ...
- [LeetCode] Verify Preorder Sequence in Binary Search Tree 验证二叉搜索树的先序序列
Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary ...
- 【LeetCode】Verify Preorder Serialization of a Binary Tree(331)
1. Description One way to serialize a binary tree is to use pre-order traversal. When we encounter a ...
- cosbench read异常解决办法。 Unable to verify integrity of data download. Client calculated content hash didn't match hash calculated by Amazon S3. The data may be corrupt.
问题:cosbench read测试failed 报错如下 Cosbench v0.4.2.c4 against Ceph (Hammer) / radosgw / HAproxy's HTTP en ...
- Leetcode 255. Verify Preorder Sequence in Binary Search Tree
验证一个list是不是一个BST的preorder traversal sequence. Given an array of numbers, verify whether it is the co ...
- Tp验证码:$Verify = new \Think\Verify(); $Verify->entry(n);【参数n,页面有多个验证码时用】
一.验证码参数:(中文字符集和英文字符集在父类里面都可以取到,可修改) //1.生成验证码 $Verify = new \Think\Verify(); $Verify->entry(n);[参 ...
- LeetCode Verify Preorder Sequence in Binary Search Tree
原题链接在这里:https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree/ 题目: Given an a ...
- [nodejs] Error: unable to verify the first certificate
Error: unable to verify the first certificate Solution npm config set registry http://registry.npmjs ...
- selenium提供了三种模式的断言:assert,verify,waitfor
Assert:失败时,该测试将终止 Verify:失败时,该测试继续执行,并将错误日志记录在日显示屏 Waitfor:等待某些条件变为真,一般使用在AJAX应用程序的测试 断言常用的有,具体见如下:a ...
- Rails 之微信开发 : OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
微信公众平台,使用Ruby On Rails + Win7 在取得OpenID时,如果简单的使用http.get方法,会出现如下 SSL_connect returned=1 errno=0 stat ...
随机推荐
- windows认证过程
NTLM简介: NTLM使用在Windows NT和Windows 2000 Server(or later)工作组环境中(Kerberos用在域模式下).在AD域环境中,如果需要认证Windows ...
- Build Post Office II
Description Given a 2D grid, each cell is either a wall 2, an house 1 or empty 0 (the number zero, o ...
- codevs 2780 ZZWYYQWZHZ
2780 ZZWYYQWZHZ 时间限制: 1 s 空间限制: 32000 KB 题目等级: 青铜 Bronze 题目描述 Description 可爱的小管在玩吹泡泡.忽然,他想到 ...
- javascript预览本地图片
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- numpy.linalg.svd函数
转载自:python之SVD函数介绍 函数:np.linalg.svd(a,full_matrices=1,compute_uv=1) 参数: a是一个形如\((M,N)\)的矩阵 full_matr ...
- socket http tcp ip 区别联系
功能是实现继承复用.刚才做了一个简要的概述,里面有一些常用的概念,这里做个简短的概念普及介绍:(1),TCP/IP------TPC/IP协议是传输层协议,主要解决数据如何在网络中传输.(2),Soc ...
- 浅谈SOA面向服务化编程架构(dubbo)
dubbo 是阿里系的技术.并非淘宝系的技术啦,淘宝系的分布式服务治理框架式HSF啦 ,只闻其声,不能见其物.而dubbo是阿里开源的一个SOA服务治理解决方案,dubbo本身 集成了监控中心,注 ...
- 删除N天前的log日志文件:RollingFileAppender,DailyRollingFileAppender,/etc/cron
1. 如果您使用的是Log4j,且采用的RollingFileAppender方式, 通过设置maxBackupIndex属性来指定要保留的日志文件数的最大值可以间接实现删除N天前的日志文件. 2. ...
- uniapp - 微信公众号授权登录
[缘由] 采用uniapp进行微信小程序和微信公众号双版本开发:考虑到用户唯一性,我们后端确定了以“unionid”.作为唯一标识. 有的小伙伴估计也是刚入这坑,我就简单说一下步骤流程 [摸索] ...
- [转]Maven 国内源配置(2019/2/14)
原文地址:https://segmentfault.com/a/1190000018147680 新年开工后要开始新的项目,但是发现一些项目的依赖没有在阿里仓库Central或Public源之中,项目 ...