How do u know someone was vaccinated

I’ve seen a few ppl post their rules for visiting their newborn & a common one is u must have gotten a flu shot/tdap etc. but how exactly would u know?