Fixed #22959 -- Documented that class-based validators need to be deconstructible.