updated editAttendance method and validation