#22255 Implemented support for re flags in RegexValidator

Added a new parameter to RegexValidator - flags that gets passed to re.compile.