thinkphp3.2.3 自动验证 正则验证

<?php
    namespace Home1\Model;
    use Think\Model;
    class ShopYuyueInfoModel extends Model {
        // protected $_validate = array(                   
        protected $_validate = array(               
            array('name','require','姓名必填..1!'), // 必填
            array('tel','/^1[34578]\d{9}$/','手机号码不对..1!',0,'regex',3),// 必填
        );
        
        
    }

 

posted @ 2017-11-19 18:05  西瓜霜  阅读(2006)  评论(0编辑  收藏  举报