Unique value validator

Something I'm using on one of my projects and thought would be helpful. I'm not sure how to write tests for this.