Skip to content

trilogy-group/contently-valid_url

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

The most accurate rails url validator.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 78.2%
  • HTML 17.3%
  • CSS 2.4%
  • JavaScript 2.1%