We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9a1c18 commit 20bd4b7Copy full SHA for 20bd4b7
Sources/ATSyntaxTools/Validators/DIDValidator.swift
@@ -66,8 +66,9 @@ public enum DIDValidator: Canonicalizable {
66
/// - Throws: ``InvalidDIDError``, indicating the DID is invalid.
67
public static func normalize(_ did: String) throws -> String {
68
let normalizedDID = did.lowercased()
69
+ let asciiDID = try Punycode.encode(normalizedDID)
70
+ try DIDValidator.validate(asciiDID)
71
- try DIDValidator.validate(normalizedDID)
72
return normalizedDID
73
}
74
0 commit comments