Added required validation function.