MemberValidate.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\admin\validate\member;
  3. use support\Validate;
  4. class MemberValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'member_id' => 'require|alphaDash',
  8. // 'account_name|账号名称' => 'require',
  9. // 'avatar|头像' => 'require',
  10. 'source|来源' => 'require', // 来源
  11. // 'is_owner' => 'require|in:Y,N',
  12. // 'classify|归类' => 'require', // 归类 会员/游客
  13. // 'birth|生日' => 'require',
  14. // 'gender|性别' => 'require',
  15. // 'status|状态' => 'require|in:ACTIVED,DISABLED',
  16. 'mobile|手机号' => 'mobile',
  17. // 'addr|具体地址' => 'require',
  18. // 'cert_name证件姓名' => 'require',
  19. 'cert_nbr|身份证号' => 'idCard',
  20. 'member_cert_face|身份证人像面照片' => 'url', // 身份证人像面照片 base64
  21. 'member_cert_photo|身份证国徽面照片' => 'url' // 身份证国徽面照片 base64
  22. ];
  23. protected $message = [];
  24. protected $scene = [
  25. 'add' => ['avatar', 'source', 'is_owner', 'classify', 'birth', 'gender', 'status', 'mobile', 'addr', 'cert_name',
  26. 'cert_nbr', 'member_cert_face', 'member_cert_photo'],
  27. 'update' => ['member_id', 'avatar', 'source', 'is_owner', 'classify', 'birth', 'gender', 'status', 'addr', 'cert_name',
  28. 'cert_nbr', 'member_cert_face', 'member_cert_photo']
  29. ];
  30. }