Fixed #22255 -- Added support for specifying re flags in RegexValidator