-
Notifications
You must be signed in to change notification settings - Fork 20
Updated dependecy for validator from ~1.5.1 to ~10.3.0. Updated newe… #154
Conversation
… 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)); |
There was a problem hiding this comment.
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.
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 |
@dustinsmith1024 |
👍 |
Published and updated the history file - https://www.npmjs.com/package/patio/v/1.4.0 |
…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
…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.