UserSalary.php 516 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\common\validate;
  3. use think\Db;
  4. use think\Validate;
  5. class UserSalary extends Validate{
  6. protected $rule = [
  7. 'user_id' => 'require|unique:user_salary',
  8. 'company_id' => 'require|gt:0',
  9. ];
  10. protected $message = [
  11. 'user_id.require' => '未选择用户',
  12. 'user_id.unique' => '已添加过该用户',
  13. 'company_id.require' => '请选择所属单位',
  14. 'company_id.gt' => '请选择所属单位',
  15. ];
  16. protected $scene = [
  17. ];
  18. }