Skip to content

Commit a5d35e9

Browse files
committed
feat: support "u" flag in regexp keyword, closes #65
1 parent 9608934 commit a5d35e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

keywords/regexp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = function defFunc(ajv) {
1111
if (typeof schema == 'object')
1212
return new RegExp(schema.pattern, schema.flags);
1313

14-
var rx = schema.match(/^\/(.*)\/([gimy]*)$/);
14+
var rx = schema.match(/^\/(.*)\/([gimuy]*)$/);
1515
if (rx) return new RegExp(rx[1], rx[2]);
1616
throw new Error('cannot parse string into RegExp');
1717
} catch(e) {

0 commit comments

Comments
 (0)