isValidSuiNSName function

bool isValidSuiNSName(
  1. String name
)

Implementation

bool isValidSuiNSName(String name) {
	if (name.length > MAX_SUI_NS_NAME_LENGTH) {
		return false;
	}

	if (name.contains("@")) {
    return RegExp(SUI_NS_NAME_REGEX, caseSensitive: false).hasMatch(name);
	}

  return RegExp(SUI_NS_DOMAIN_REGEX, caseSensitive: false).hasMatch(name);
}