illegalCharacters static method

void illegalCharacters(
  1. String name,
  2. String string
)

Throws a StickerPackException when the string contains illegal characters

Implementation

static void illegalCharacters(String name, String string) {
  if (!_legalCharacters.hasMatch(string)) {
    throw StickerPackException(
      '$name can only contain alphanumeric characters and "_" and "-"',
    );
  }
}