fix to validate unique values when it's present