开发者

where to place extended validators in rails3

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开发者_JAVA技巧 regex.

Where should I put the file? it's matter if it in apps/validators or libs/validators?


The libs directory is preferred. Watch this screencast for greater detail:

http://railscasts.com/episodes/211-validations-in-rails-3

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜