Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Updated dependecy for validator from ~1.5.1 to ~10.3.0. Updated newe… #154

Merged
merged 3 commits into from
Jun 24, 2018

Conversation

funkyshu
Copy link
Member

…r style calls and relaxed new URL check to allow localhost as the earlier version did.
Bumped package.json version from 1.3.0 to 1.3.1.

… style calls and relaxed new URL check to allow localhost as the earlier version did.
}, merge({message:"{col} must be a valid Email Address got {val}"}, opts));
},

isUrl:function isUrl(opts) {
return this.__addAction(function (col) {
return validatorCheck(col).isUrl();
return !!col.match(/^(?:https?|ftp):\/\/localhost/) || validator.isURL(col);
}, merge({message:"{col} must be a valid url got {val}"}, opts));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New valididator.isURL function excludes hostnames w/o tld be default. The old function did too but allowed localhost, so I specifically allow for it here.

@dustinsmith1024
Copy link
Contributor

How come there is no test run on Travis for this? We also import validator directly into C2FO API so lets be sure to test this branch against C2FO before merging.

It doesnt look like this version of validator is tested against Node 5 either on Travis. https://travis-ci.org/chriso/validator.js

@funkyshu
Copy link
Member Author

funkyshu commented Jun 23, 2018

@dustinsmith1024
Tested against C2FO API. NPM will nest the this version under patio in node_modules while 1.5 will be at the top level since it's a direct dependency. I did run all tests to be certain.

@dustinsmith1024
Copy link
Contributor

👍

@funkyshu funkyshu merged commit c159904 into C2FO:master Jun 24, 2018
@dustinsmith1024
Copy link
Contributor

dustinsmith1024 commented Jun 25, 2018

Published and updated the history file - https://www.npmjs.com/package/patio/v/1.4.0

jonstacks pushed a commit to jonstacks/patio that referenced this pull request Feb 24, 2019
…C2FO#154)

* Updated dependency for validator from ~1.5.1 to ~10.3.0.  

* Updated newer style calls and relaxed new URL check to allow localhost as the earlier version did.

* Bumped version from 1.3.0 to 1.4.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants