You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
645 B

7 years ago
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. class SmsLog extends Validate
  5. {
  6. // 验证规则
  7. protected $rule = [
  8. ['id', 'require|number','ID必填|ID必须是数字'],
  9. ['mobile', 'require|max:20','手机号必填|手机号不能超过20个字符'],
  10. ['text', 'require|max:200','发送的内容必填|发送的内容不能超过200个字符'],
  11. ['status', 'in:1,2','状态:1成功,2失败'],
  12. ['result', 'max:500', '返回结果不能超过500个字符'],
  13. ];
  14. protected $scene = [
  15. 'add' => ['mobile', 'text', 'status', 'result'],
  16. 'del' => ['id'],
  17. ];
  18. }