Closed anandrajneesh closed 7 years ago
pattern is converted to a RegExp object
using new RegExp(arg)
constructor. RegExp.test will work on all the datatypes as long as they are converted to proper strings. Refer ECMA-6 specs for more details. So for clients giving inputs different than strings regex will still hold if pattern matches.
Implemented in v1.2.0
Add a new comparator regex in comparators. This should work only for string datatypes, for now engine would not enforce any data typing on the input, it is the responsibility of client. Though test cases should document the behaviour of regex comparator with unsupported data types.