refactor ruby on rails validations with new style