prepare validation hooks