UuidValue.withFormatValidation constructor

UuidValue.withFormatValidation(
  1. String uuid, [
  2. bool noDashes = false
])

withFormatValidation() creates a UuidValue from a uuid string. Throws FormatException if the UUID format is invalid. No validation is performed on the content of the uuid.

Implementation

factory UuidValue.withFormatValidation(String uuid, [bool noDashes = false]) {
  final uuidValue = UuidValue.fromString(uuid);
  uuidValue.validateFormat(noDashes);
  return uuidValue;
}