Context. The Pan-STARRS 3π survey has detected hundreds of thousands of variable stars thanks to its coverage and 4-year time span, even though the sampling of the light curves is relatively sparse. These light curves contain only 10–15 detections in each of the five filters (g, r, i, z, y). During the K2 mission, the Kepler space telescope observed along the ecliptic plane with a high sampling frequency, although only for about 80 days in each of its campaigns. Aims. Crossmatching and investigating the RR Lyrae stars observed by both K2 and Pan-STARRS can serve as a valuable tool to validate the classification and period determination of the ground-based survey. Methods. We used the Sesar catalogue of RR Lyrae stars detected by Pan-STARRS. After determining the overlap between the stars observed by both Pan-STARRS and K2, we also considered the Gaia DR3 SOS RR Lyrae catalogue data for the list of these stars wherever it was available. The frequencies of the light variations were calculated by applying the Lomb-Scargle periodogram method on the K2 light curves that were prepared with autoEAP photometry. The calculated frequencies of the stars then were compared with those given in the Sesar catalogue and the Gaia DR3 RR Lyrae catalogue. Results. We found that for the majority of the stars, the classification (95.6%) and the frequency determination (90.1%) of the Pan-STARRS RR Lyrae stars were consistent within 0.03 d−1 with those that we derived from the K2 autoEAP light curves. For a significant subset of the sample, 7.4%, however, an offset of 1 or 2 d−1 was found in the frequencies. These are the result of the sampling of the detections, because Pan-STARRS observations are affected by diurnal cycles, whereas Kepler carried out measurements quasi-continuously. We found that RRc subtypes are significantly more affected (25.3%) than RRab subtypes (3.7%), which is most likely caused by RRc stars having less sharp light curve features. Validation via space-based data will be important for future ground-based surveys, as well.