better validation of unique items in registration code