The ruling marks the first time a 14th Amendment challenge to Trump’s candidacy has been successful.