Pattern Mismatch
class PatternMismatch(val path: String, val raw: String, val pattern: String, val description: String? = null) : ConfigError
A string value does not match the regex declared by the @Pattern annotation.
Generated during post-deserialization validation. Like OutOfRange, the deserializer falls back to the Kotlin default when one is available.
Example:
data class Network(@Pattern(regex = "^(https?://).+") val endpoint: String = "http://localhost")Content copied to clipboard
With YAML endpoint: "ftp://files":
PatternMismatch(path = "network.endpoint", raw = "ftp://files", pattern = "^(https?://).+")Content copied to clipboard
Since
1.0
Parameters
path
Dot-separated field path.
raw
The string value that failed validation.
pattern
The regex pattern that was expected to match.
description
Optional human-readable description from the annotation.