The second data release of the Gaia mission includes an advance catalog of variable stars. The classification of these stars are based on sparse photometry from the first 22 months of the mission. We set out to investigate the purity and completeness of the all-sky Gaia classification results with the help of the continuous light curves of the observed targets from the Kepler and K2 missions, focusing specifically on RR Lyrae and Cepheid pulsators, outside the Galactic Bulge region. We crossmatched the Gaia identifications with the observations collected by the Kepler space telescope. We inspected the light curves visually, then calculated the relative Fourier coefficients and period ratios for the single- and double-mode K2 RR Lyrae stars to further classify them. We identified 1443 and 41 stars classified as RR Lyrae or Cepheid variables in Gaia DR2 in the targeted observations of the two missions and 263 more RR Lyre targets in the Full-Frame Images (FFI) of the original mission. We provide the crossmatch of these sources. We conclude that the RR Lyrae catalog has a completeness between 70-78%, and provide a purity estimate between 92-98% (targeted observations) with lower limits of 75% (FFI stars) and 51% (K2 worst-case scenario). The low number of Cepheids prevents us from drawing detailed conclusions but the purity of the DR2 sample is estimated to be around 66%.