validate method

void validate([
  1. ValidationMode validationMode = ValidationMode.strictRFC4122,
  2. bool noDashes = false
])

validate() validates the internal string representation of the uuid. Optionally, you can provide a validationMode to use when validating the uuid string. Throws FormatException if the UUID is invalid.

Implementation

void validate(
    [ValidationMode validationMode = ValidationMode.strictRFC4122,
    bool noDashes = false]) {
  UuidValidation.isValidOrThrow(
      fromString: uuid, validationMode: validationMode, noDashes: noDashes);
}