Utils function to validate a regex with a dynamic value and a string
static bool validateRegex(String regexString, dynamic value) { return RegExp(regexString).hasMatch(value.toString()); }