Reputation: 1471
I want to add email validator to my rails models.
After some searches I found out that this isn't possible by default and that I should write my own format validator with regex.
Where should I put the file? it's matter if it in apps/validators or libs/validators?
Upvotes: 1
Views: 149
Reputation: 3015
The libs directory is preferred. Watch this screencast for greater detail:
http://railscasts.com/episodes/211-validations-in-rails-3
Upvotes: 1