Make uniqueness validator rails 4.2 compatible