contract validation