Selleraddress.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Selleraddress extends Validate
  12. {
  13. protected $rule = [
  14. 'seller_name' => 'require',
  15. 'area_id' => 'require|number',
  16. 'city_id' => 'require|number',
  17. 'area_info' => 'require',
  18. 'daddress_detail' => 'require',
  19. ];
  20. protected $message = [
  21. 'seller_name.require' => '收件人不能为空',
  22. 'area_id.require' => '请选择地址|请选择地址',
  23. 'area_id.number' => '请选择地址|请选择地址',
  24. 'city_id.require' => '请选择地址|请选择地址',
  25. 'city_id.number' => '请选择地址|请选择地址',
  26. 'area_info.require' => '请选择地址',
  27. 'daddress_detail.require' => '详细地址不能为空',
  28. ];
  29. protected $scene = [
  30. 'address_add' => ['seller_name', 'area_id', 'city_id', 'area_info', 'daddress_detail', 'daddress_telphone'],
  31. ];
  32. }