Skip to content

Commit

Permalink
Merge pull request #182 from ChALkeR/chalker/fix-comma
Browse files Browse the repository at this point in the history
Fix uri scheme validation
  • Loading branch information
LinusU authored Jul 22, 2020
2 parents 5389c5b + b6ea484 commit d36a1b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports['time'] = /^\d{2}:\d{2}:\d{2}$/
exports['email'] = function (input) { return (input.indexOf('@') !== -1) && (!reEmailWhitespace.test(input)) }
exports['ip-address'] = exports['ipv4'] = createIpValidator({ version: 4 })
exports['ipv6'] = createIpValidator({ version: 6 })
exports['uri'] = /^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/
exports['uri'] = /^[a-zA-Z][a-zA-Z0-9+\-.]*:[^\s]*$/
exports['color'] = /(#?([0-9A-Fa-f]{3,6})\b)|(aqua)|(black)|(blue)|(fuchsia)|(gray)|(green)|(lime)|(maroon)|(navy)|(olive)|(orange)|(purple)|(red)|(silver)|(teal)|(white)|(yellow)|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\))/
exports['hostname'] = function (input) {
if (!(reHostnameFirstPass.test(input))) return false
Expand Down

0 comments on commit d36a1b1

Please sign in to comment.