diff --git a/lib/types/string.js b/lib/types/string.js index 387c992b..12ad12ec 100755 --- a/lib/types/string.js +++ b/lib/types/string.js @@ -27,7 +27,7 @@ const internals = { } }, dataUriRegex: /^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/, - hexRegex: /^[a-f0-9]+$/i, + hexRegex: /^(0x)?[0-9a-f]+$/i, ipRegex: Ip.regex({ cidr: 'forbidden' }).regex, isoDurationRegex: /^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,