12345678910111213141516171819202122232425262728 |
- <?php
- namespace app\admin\validate\life;
- use think\Validate;
- class PerformersValidate extends Validate
- {
- protected $rule = [
- 'performers_name' => 'require',
- 'performers_id' => 'require',
- 'performers_img' => 'require',
- 'performers_type' => 'require',
- ];
- protected $message = [
- 'performers_id.require' => '演职ID不能为空',
- 'performers_name.require' => '演职名称不能为空',
- 'performers_img.require' => '演职照片不能为空',
- 'performers_type.require' => '演职类型不能为空',
- ];
- //场景
- protected $scene = [
- 'create' => ['performers_name','performers_img','performers_type'],
- 'update' => ['performers_id','performers_name','performers_type'],
- 'info' => ['performers_id']
- ];
- }
|