You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Matches predicate which helps to do regex check is throwing and rgx.test is not a function.
Rule and whole Engine run I used:
var Engine = require("json-rules-engine-simplified").default
let regexp = new RegExp('g')
console.log(regexp, "regular expression")
let rules = [{
conditions: {
"firstName": {
"matches": regexp
}
},
event: {
"ignore": "fjbehdsj"
}
}];
let input = {"firstName": "ugvdfvgfd"}
let engine = new Engine(rules)
engine.run(input).then((events) => {
console.log("events", events)
})
Error :
TypeError: rgx.test is not a function
in predicate/lib/predicates.js — line 182
at Object.curried (as matches) in predicate/lib/utils.js — line 22
in json-rules-engine-simplified/lib/checkField.js — line 39
at Array.every in ECMAScript
The text was updated successfully, but these errors were encountered:
Matches predicate which helps to do regex check is throwing and rgx.test is not a function.
Rule and whole Engine run I used:
Error :
The text was updated successfully, but these errors were encountered: