Uppercase, insert the inward-code space, and check the Royal Mail pattern (e.g. LU1 2AB, EC1A 1BB, W1A 0AX). This is a format check only — it does not look up addresses.