Closed mortbauer closed 1 year ago
Describe the bug Although trying to be generic for different protocols the isURL check always valdiates hosts even if no host specified.
Examples My use case is to validate a postgresql uri with using a unix socket which could look like:
postgres://user:pw@/test?host=/var/run/postgresql
isURL always returns false, not matter which options specified, even with require_host=false.
require_host=false
if i change the url to:
postgres://user:pw@localhost.com/test?host=/var/run/postgresql
it would validate to true.
Additional context Validator.js version: 13.7.0 (current HEAD) Node.js version: doesn't matter OS platform: doesn't matter
closing, as this was fixed with commit https://github.com/validatorjs/validator.js/commit/9f89f3bbb67241d3f27fc7191451c9b229e72591 // PR #1995
Describe the bug Although trying to be generic for different protocols the isURL check always valdiates hosts even if no host specified.
Examples My use case is to validate a postgresql uri with using a unix socket which could look like:
isURL always returns false, not matter which options specified, even with
require_host=false
.if i change the url to:
it would validate to true.
Additional context Validator.js version: 13.7.0 (current HEAD) Node.js version: doesn't matter OS platform: doesn't matter