>  def custom_validation
>    errors.add(:dd_account, "Some error message") if detect_something
>  end

You can do this part.  How about using the class methods so I can
avoid resorting to this?

  def dd_details
    errors.add(:dd_account, "^Account number|Must be 8 digits long")
unless dd_account.to_s.length == 8
  end

Ok, that's an easy one but some of the others are a little more tricky
and I would like to use them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to