Bring UniqueValidator implementation in line with other uniquness validators.