added validation to edit periods page