Provides the best known regex for validating and extracting URLs.
It builds on amazing work done by Diego Perini and Mathias Bynens.
The package can be installed as:
- Add
valid_url
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:valid_url, "~> 0.1.1"}]
end
```
- Ensure
valid_url
is started before your application:
```elixir
def application do
[applications: [:valid_url]]
end
```
ValidUrl.validate("https://www.spencercreasey.com") # => true
ValidUrl.validate("ftp://www.example.com") # => true
ValidUrl.validate("www.google.com") # => false
mix test
MIT
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request