Memberflea.php 887 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * ============================================================================
  12. * 验证器
  13. */
  14. class Memberflea extends Validate
  15. {
  16. protected $rule = [
  17. 'goods_name' => 'require',
  18. 'goods_price' => 'require'
  19. ];
  20. protected $message = [
  21. 'goods_name.require' => '宝贝标题不能为空',
  22. 'goods_price.require' => '宝贝原价不能为空'
  23. ];
  24. protected $scene = [
  25. 'edit_save_goods' => ['goods_name', 'goods_price'],
  26. 'save_goods' => ['goods_name', 'goods_price'],
  27. ];
  28. }