Here's a validation test I wrote for a MySQL username:
validation {
condition = length(var.username) > 16
error_message = "The username cannot be more than 16 characters (first 16 are ${trim(var.username, 0, 16)})."
}
I wanted to give a hint to the operator about the longest string allowed, to make their life easier. But you can't use functions in error_message. Please add support for the above use-case.
Here's a validation test I wrote for a MySQL username:
I wanted to give a hint to the operator about the longest string allowed, to make their life easier. But you can't use functions in
error_message. Please add support for the above use-case.