PerformersValidate.php 835 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\admin\validate\life;
  3. use think\Validate;
  4. class PerformersValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'performers_name' => 'require',
  8. 'performers_id' => 'require',
  9. 'performers_img' => 'require',
  10. 'performers_type' => 'require',
  11. ];
  12. protected $message = [
  13. 'performers_id.require' => '演职ID不能为空',
  14. 'performers_name.require' => '演职名称不能为空',
  15. 'performers_img.require' => '演职照片不能为空',
  16. 'performers_type.require' => '演职类型不能为空',
  17. ];
  18. //场景
  19. protected $scene = [
  20. 'create' => ['performers_name','performers_img','performers_type'],
  21. 'update' => ['performers_id','performers_name','performers_type'],
  22. 'info' => ['performers_id']
  23. ];
  24. }