validates_url_of
validates_url_of copied to clipboard
a Rails plugin to validate URL attribute and append http://
= Validates URL of
This plugin validate URL attribute:
- If data have not http:// or https://, it append http://
- Check url format by regular expression
- Send a HTTP request to check header response (only enable in production mode and options[:enable_http_check] is true)
== Usage
class Foo < ActiveRecord::Base validates_url_of :url, :message => 'is not valid or not responding'.t end
you can omit :message parameter
== Author Wen-Tien Chang ([email protected])
== License Copyright (c) 2008 Handlino Inc., released under the MIT license