开发者

Rails 3 EachValidator for URLs

I want to create an EachValidator that I can use to test the validity of a given URL. Basi开发者_StackOverflow中文版cally I would like to first test if it matches a URL format. If it appears to be a URL then use Net::HTTP to try and resolve the URL (including following redirects). Has anyone out there already done similar to this and would be willing to share their code?


Check out https://gist.github.com/948880

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜