Check if a string is a valid error code
static bool isValidError(String errorCode) { return error.hasMatch(errorCode); }