hashicorp / hashicorp/hcl

Invalid validation error message when using multi-line string

Open
#388 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
5.8k
Forks
657
Avg merge
20h 36m
Merged PRs (30d)
6

Description

### HCL Template
```hcl

---snip---
variable "UserSetting" {
type = string
validation {
condition = can(regex("^((?:.*[a-zA-Z0-9])|(?:.*[!@#$%^&*])|(?:.*[0-9]))(?:.{8,})", var.UserSetting))
error_message = <

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the validation failure from the HCL example in deployments/4.0.0/cluster_vars.tf with a plan or apply. Trace the validation error-message handling to determine why a multi-line string is rejected, then verify that multi-line messages are accepted and the English-sentence punctuation requirement is removed or revised as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.