Quite a silly requirement - you don't want a registration form to fail for 'no reason', you're just going to have huge abandonment.
If this is for a client, recommend that they reconsider. If it's for an assignment, just do it, because lets be honest, most assignments have ridiculous requirements anyway.