pub type RegexCheck<'a> = &'a dyn Fn(&str, u32) -> Result<(), String>;
The check of a regular expression: the pattern and the cflags, and the message of pg_regerror for a pattern that is not valid.
cflags
pg_regerror