The dismissals appeared to violate federal law, which requires the president to give both houses of Congress reasons for the dismissals 30 days in advance.