![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tp5 validate验证
黄金萝卜
这个作者很懒,什么都没留下…
展开
-
正整数validate验证
protected function isPositiveInteger($value,$rule='',$data='',$field=''){ if (is_numeric($value) && is_int($value + 0) && ($value + 0) > 0) { return true; } else { return false转载 2017-11-21 18:16:35 · 5616 阅读 · 0 评论 -
IDS验证(正整数并且是逗号分隔)
class IDCollection extends BaseValidate { protected $rule = [ 'ids' => 'require|checkIDs' ]; protected $message = [ 'ids' => 'ids参数必须是以逗号分隔的多个正整数' ]; //ids = id1,转载 2017-11-21 20:46:36 · 527 阅读 · 0 评论