He contested Cardiff North in October 1974 United Kingdom general election and 1979 United Kingdom general election for the Liberals , before fighting Cardiff Central in 1983 United Kingdom general election and 1987 United Kingdom general election for the SDP-Liberal Alliance , but was unsuccessful on each occasion .