Membership - how do i require people to have an invitation code before they can register?

hi folks,

i am running membership on a site.
the client would like people to be required to give their invitation code before they can register for the site.

how do i force that?

i set up the necessary ticks in the membership / options / extra settings, but it still lets me register a new user without asking for the invite code.

is this possible to enforce?