added validateDetails method