解决Layui隐藏表单校验问题 重写required required:function (value,item){ if ($(item).parent().parent().is(":visible")) { if (value == null || value == '') { return '必填项不能为空'; } } }