This is the Official URL Validator Plugin for the Composed Validations Library.
npm install cv-url
var validations = require('composed-validations');
var urlValidator = require('cv-url')(validations);
urlValidator.test("http://www.RegExr.com"); // will return http://www.RegExr.com
urlValidator.test('\\http@://google.com'); // false (will throw an error with the error message: is not a valid url)
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D