You can use a custom validation method to check this.
class User < ActiveRecord::Base
# ...
def validate
if (self.email == self.password)
errors.add(:password, "password cannot equal email")
errors.add(:email, "email cannot equal password")
end
end
end