Selleraddress.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  9. * 网站地址: https://www.valimart.net/
  10. * ----------------------------------------------------------------------------
  11. *
  12. * ============================================================================
  13. * 验证器
  14. */
  15. class Selleraddress extends Validate
  16. {
  17. protected $rule = [
  18. 'seller_name'=>'require',
  19. 'area_id'=>'require|number',
  20. 'city_id'=>'require|number',
  21. 'area_info'=>'require',
  22. 'daddress_detail'=>'require',
  23. ];
  24. protected $message = [
  25. 'seller_name.require'=>'收件人不能为空',
  26. 'area_id.require'=>'请选择地址|请选择地址',
  27. 'area_id.number'=>'请选择地址|请选择地址',
  28. 'city_id.require'=>'请选择地址|请选择地址',
  29. 'city_id.number'=>'请选择地址|请选择地址',
  30. 'area_info.require'=>'请选择地址',
  31. 'daddress_detail.require'=>'详细地址不能为空',
  32. ];
  33. protected $scene = [
  34. 'address_add' => ['seller_name', 'area_id', 'city_id', 'area_info', 'daddress_detail', 'daddress_telphone'],
  35. ];
  36. }