I have several ActiveRecord models that contain email addresses and I''d like to be able to DRY up the validation for them so I only have to put the appropriate regex in one place. Currently each model has its own "validates_format_of" with the same regex provided for the appropriate email field. Some options: 1) One option is to use composed_of - would this work for me? I''d need to compose each email field as an EmailAddress model object in my various models. 2) Alternatively, there seems to be an opportunity here for declaring validations that span models - either by naming them, or pointing to a method somewhere, etc. Then I could just say "validates_format_of by using this code that I''m referencing" in my model objects. Thoughts? Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---