Added validator to ensure keys are unique.