def self.duplicated_full_name_profiles validates_uniqueness_of :first_name, scope: :last_name #(xxxxxxxxxxxxxx) end
http://guides.rubyonrails.org/active_record_validations_callbacks.html#performing-custom-validations
https://github.com/rails/rails/blob/master/guides/source/active_record_validations.md#performing-custom-validations https://github.com/rails/rails/blob/master/guides/source/active_record_validations.md#validates_with
#1 楼 @jhjguxin Many thanks :D