Regular expression for validating a url Free mobile sex chat from women
In the case of a URL, finding a regular expression that validates every type of URL possible is very difficult.
It’s not particularly difficult and there are a ton of ways to make improvements like adding paths or additional guards.
This is the fastest way to put the kibosh on simple URL errors but unfortunately leaves a lot of holes open for users to fall through.
Here is my favorite: https://github.com/perfectline/validates_url This gem provides easy URL validations that are similar to other validations you might have written.
Simply add a new section in your model and you are good to go!