Please revert fix made in scope of #815.
This fix was deployed based on incorrect assumption that java works incorrectly with regexp.
But actually issue is not in java. Issue (reported in #814) was caused by incorrect regexp which author uses us json schema.
STR:
GIVEN:
user (in schema) defines regexp as: ^red|banana$ (starts with 'red' OR ends with 'banana')
to pass any strings like: "red", "banana", "red apple", "green banana", "red oval apple"
But the #815 fix will will change regexp to ^(red|banana)$ which will pass ONLY "red" or "banana"
For more details please see my comment to the code
https://github.com/networknt/json-schema-validator/pull/815/files#diff-776968543c85221a4907857a99fb117ab32872c5f0c020a717c11fe8162ef310R12-R24
Please revert fix made in scope of #815.
This fix was deployed based on incorrect assumption that java works incorrectly with regexp.
But actually issue is not in java. Issue (reported in #814) was caused by incorrect regexp which author uses us json schema.
STR:
GIVEN:
user (in schema) defines regexp as:
^red|banana$(starts with 'red' OR ends with 'banana')to pass any strings like: "red", "banana", "red apple", "green banana", "red oval apple"
But the #815 fix will will change regexp to
^(red|banana)$which will pass ONLY "red" or "banana"For more details please see my comment to the code
https://github.com/networknt/json-schema-validator/pull/815/files#diff-776968543c85221a4907857a99fb117ab32872c5f0c020a717c11fe8162ef310R12-R24