EditProduct.php 1011 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\validate;
  3. class EditProduct extends \think\Validate
  4. {
  5. protected $rule = [
  6. "id"=>"require",
  7. 'product_name' => 'require',
  8. 'product_class_id' => 'require',
  9. 'qydm' => 'require',
  10. 'scale' => 'require',
  11. 'scale_class' => 'require',
  12. 'production' => 'require',
  13. 'production_class' => 'require',
  14. 'ship' => 'require',
  15. ];
  16. protected $message = [
  17. "id.require"=>"ID不能为空",
  18. 'product_name.require' => '产品名称不能为空',
  19. 'product_class_id.require' => '产品分类不能为空',
  20. 'qydm.require' => '企业代码不能为空',
  21. 'scale.require' => '规模数值不能为空',
  22. 'scale_class.require' => '规模单位不能为空',
  23. 'production.require' => '产量不能为空',
  24. 'production_class.require' => '产量单位不能为空',
  25. 'ship.require' => '上市月份不能为空',
  26. ];
  27. }