Selleraddress.php 1.3 KB

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