12345678910111213141516171819202122232425 |
- <?php
- namespace app\common\validate;
- use think\Db;
- use think\Validate;
- class UserSalary extends Validate{
- protected $rule = [
- 'user_id' => 'require|unique:user_salary',
- 'company_id' => 'require|gt:0',
- ];
- protected $message = [
- 'user_id.require' => '未选择用户',
- 'user_id.unique' => '已添加过该用户',
- 'company_id.require' => '请选择所属单位',
- 'company_id.gt' => '请选择所属单位',
- ];
- protected $scene = [
- ];
- }
|