ChatDirectLinkSlug constructor

ChatDirectLinkSlug(
  1. String value
)

Implementation

ChatDirectLinkSlug(String value) : super(value.trim()) {
  if (val.length > 100) {
    throw const FormatException('Must contain no more than 100 characters');
  } else if (val.isEmpty) {
    throw const FormatException('Must not be empty');
  } else if (!_regExp.hasMatch(val)) {
    throw FormatException('Does not match validation RegExp: `$val`');
  }
}