"required|string|confirmed|min:8", "security_code" => [ "required", "integer", Rule::exists("users")->where(function ($query) use ($that) { $query->where("id", $that->route("id")); }), ] ]; } }