UuidValue.withValidation constructor
UuidValue.withValidation(
- String uuid, [
- ValidationMode validationMode = ValidationMode.strictRFC4122,
- bool noDashes = false
withValidation() creates a UuidValue from a uuid
string.
Optionally, you can provide a validationMode
to use when validating
the uuid string.
Throws FormatException if the UUID is invalid.
Implementation
factory UuidValue.withValidation(String uuid,
[ValidationMode validationMode = ValidationMode.strictRFC4122,
bool noDashes = false]) {
final uuidValue = UuidValue.fromString(uuid);
uuidValue.validate(validationMode, noDashes);
return uuidValue;
}