AliSms.php 649 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 https://www.sapixx.com All rights reserved.
  4. * @license Licensed (http://www.apache.org/licenses/LICENSE-2.0).
  5. * @author pillar<ltmn@qq.com>
  6. * 用户验证
  7. */
  8. namespace app\system\validate;
  9. use think\Validate;
  10. class AliSms extends Validate{
  11. protected $rule = [
  12. 'phone_id' => 'require|mobile',
  13. 'sms_code' => 'require|min:4|max:6',
  14. ];
  15. protected $message = [
  16. 'phone_id' => '请输入正确的手机号',
  17. 'sms_code' => '验证码输出错误',
  18. ];
  19. protected $scene = [
  20. 'getsms' => ['phone_id'],
  21. ];
  22. }