SalesmanValidate.php 858 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\admin\validate\medical;
  3. use support\Validate;
  4. class SalesmanValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'salesman_id' => 'require|integer',
  8. 'salesman_shop_id' => 'require|integer',
  9. 'salesman_name|姓名' => 'require',
  10. 'salesman_username|登录名' => 'require|alphaDash',
  11. 'salesman_password|密码' => 'require|alphaDash',
  12. 'salesman_phone|手机号' => 'require|mobile',
  13. 'salesman_status' => 'require|in:0,1'
  14. ];
  15. protected $message = [];
  16. protected $scene = [
  17. 'add' => ['salesman_shop_id', 'salesman_name', 'salesman_username', 'salesman_password',
  18. 'salesman_phone', 'salesman_status'],
  19. 'update' => ['salesman_id', 'salesman_shop_id', 'salesman_name', 'salesman_username',
  20. 'salesman_phone', 'salesman_status'],
  21. ];
  22. }