YANG allows an int data type to have a range validator with a custom error-message.
Is there a similar way to have a custom error-message for pattern or length validation in a string data type? For example, something like:
type string {
pattern “[a-z]+” {
error-message “Value must be comprised of lowercase characters.”;
}
length “1…4” {
error-message “Length must be 1-4 characters.”;
}
}