IndexValidate.php 416 B

123456789101112131415161718192021
  1. <?php
  2. namespace app\admin\validate\customer;
  3. use support\Validate;
  4. class IndexValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'id|ID' => 'require|integer',
  8. 'mobile|手机号' => 'mobile',
  9. 'card_id|身份证号码' => 'idCard'
  10. ];
  11. protected $message = [];
  12. protected $scene = [
  13. 'add' => ['mobile', 'card_id'],
  14. 'update' => ['id', 'mobile', 'card_id']
  15. ];
  16. }