Add support for validation hooks.