Skip to content

feat: support custom error message for number-typed coder parameters #12192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 2 tasks
mtojek opened this issue Feb 16, 2024 · 0 comments · Fixed by #12224
Closed
1 of 2 tasks

feat: support custom error message for number-typed coder parameters #12192

mtojek opened this issue Feb 16, 2024 · 0 comments · Fixed by #12224
Assignees

Comments

@mtojek
Copy link
Member

mtojek commented Feb 16, 2024

The goal of this issue is to expand validation rules to support custom error message for number-typed coder parameters. So far, an error message have been tightly coupled with string-type param and regex. The idea is to make it also available for numbers.

data "coder_parameter" "instances" {
  name        = "Instances"
  type        = "number"
  description = "Number of compute instances"
  validation {
    min       = 1
    max       = 8
    monotonic = "increasing"
    error = "Number of compute instances must be between {min} and {max}."
  }
}

Battle plan:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant