isValid

open override val isValid: Boolean?(source)

Returns whether this string's rawValue is valid for its concrete ASN.1 string type:

With the sole exception of UTF8 (which validates the raw UTF-8 bytes directly), validation is evaluated against the decoded value.

Accuracy caveat: Teletex, General, and Graphic cannot be validated exactly (their true repertoires are multi-byte / ISO 2022). They perform best-effort recognition: true for a recognized subset, null for anything else, and never false — so they never reject potentially-valid input. UTF8, IA5, Visible, Printable, and Numeric validate their exact repertoires and do report false for violations.