UserRegisterValidate.php 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\validate\admin;
  12. use think\Validate;
  13. class UserRegisterValidate extends Validate
  14. {
  15. protected $failException = true;
  16. protected $rule = [
  17. 'is_phone_login|商城用户强制手机号登录(绑定)' => 'require|in:0,1',
  18. 'open_update_info|用户修改头像和昵称' => 'require|in:0,1',
  19. 'first_avatar_switch|小程序首次登录获取头像昵称' => 'require|in:0,1',
  20. 'wechat_phone_switch|手机号快速验证组件' => 'require|in:0,1',
  21. 'newcomer_status|注册有礼启用' => 'require|in:0,1',
  22. 'register_give_integral|注册赠送积分' => 'require|min:0|number',
  23. 'register_give_money|赠送余额' => 'float|min:0',
  24. ];
  25. }