Five appeal judges gave their decision after the Home Office appealed against a High Court ruling that the ban was unlawful.
The legal action was taken by a girl who attended a Belfast primary school and her father.
More from us
Did you know with a Plus subscription to Express and Star you get full access to our award winning journalism for the news that matters to you and more.