Project

valid_url

0.07
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Provides with the ability to validate url (Rails 4). Allow using http, https and schema-less urls, checks domain zones, IP-based hostnames, name space specifications and hostname characters.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

Valid Url

The accurate and reliable rails url validator (Rails 4). Valid Url gem provides you with the ability to smart and easy validate URL.

Installation

Add it to your Gemfile:

gem 'valid_url'

Run the following command to install it:

bundle install

Usage

class WebSite < ActiveRecord::Base
  validates :url, :url => true
end

Features

  • Allow using http, https and schema-less urls. (will be configurable in future)
  • Checking domain zones (The Root Zone Database)
  • Allow and validate ip-based hostnames.
  • Checking name space specifications and terminology (RFC 1034, Section 3.1).
  • Checking hostname characters.

Motivation

Despite the fact that there are several good url validation gems on github none of them could satisfy strict standards and rules.

Tests

The highest test coverage with more than a hundred different valid and invalid url examples.

Contributors

Special thanks go to the Addressable gem author and contributors. However, there are plans to abandon third-party libraries.

License

This projected is licensed under the terms of the MIT license.