Add a promise validation function.