MCPcopy Index your code
hub / github.com/coder/coder / validationEnabled

Function validationEnabled

codersdk/richparameters.go:176–183  ·  view source on GitHub ↗
(param TemplateVersionParameter)

Source from the content-addressed store, hash-verified

174}
175
176func validationEnabled(param TemplateVersionParameter) bool {
177 return len(param.ValidationRegex) > 0 ||
178 param.ValidationMin != nil ||
179 param.ValidationMax != nil ||
180 len(param.ValidationMonotonic) > 0 ||
181 param.Type == "bool" || // boolean type doesn't have any custom validation rules, but the value must be checked (true/false).
182 param.Type == "list(string)" // list(string) type doesn't have special validation, but we need to check if this is a correct list.
183}
184
185// ParameterResolver should be populated with legacy workload and rich parameter values from the previous build. It then
186// supports queries against a current TemplateVersionParameter to determine whether a new value is required, or a value

Callers 1

validateBuildParameterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected