HTML代码
<form id='formDemo' action="" method='POST' class="layui-form">
<input type="text" class="cell-input"name="type" lay-verify="type|required" placeholder="类型" autocomplete="off" />
<input type="text" class="cell-input"name="address" lay-verify="address|required" placeholder="请选择钱包地址" autocomplete="off" /> <input type="submit" class="btn-block btn-primary address_save" value="保存" lay-filter="formDemo" lay-submit/></form>
layui.use('form', function(){
var form = layui.form;
//自定义验证规则