title: Validating content of the attributes to not be the same
body: <p>I am trying to write a unit testing for a User model in Ruby on Rails. I am using authlogic and need to check that the first_name and last_name of the user model attributes are not the same when the user is registering.</p>
  
  <p>This is my user model:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    acts_as_authentic do |c|
      c.login_field= :username
    end
  has_many :memberships, :class_name =&gt; "Project::Membership"
    has_many :projects, :through =&gt; :memberships
    has_one :profile
  
    validates :email, :presence =&gt; true, :uniqueness =&gt; true
    validates :username, :presence =&gt; true, :uniqueness =&gt; true
    validates :first_name,:presence =&gt; true
    validates:last_name, :presence =&gt; true
    validates :title, :presence =&gt; true
    validates :password, :presence =&gt; true
    validates :password_confirmation, :presence =&gt; true
    validates :gender, :presence =&gt; true
    # Custom validator
    validates :first_name, :last_name, :different_names =&gt; true
  </code></pre>
  
  <p>As you can see, I tried to create a custom validator creating a new file in /lib/different_names_validator.rb with a class called DifferntNamesValidator, but couldn't get it, as I got the following error: Unknown validator: 'different_names' (ArgumentError)</p>
  
  <p>Thanks in advance!</p>