Adds the callback and related hook for the validate call