Skip to content

Commit

Permalink
add validation of tz found
Browse files Browse the repository at this point in the history
  • Loading branch information
imjaroiswebdev committed Feb 29, 2024
1 parent 80b1128 commit f55f9f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ func ValidateTZValueDiagFunc(v interface{}, p cty.Path) diag.Diagnostics {
value := v.(string)
valid := false

if sort.SearchStrings(validTZ, value) < len(validTZ) {
foundAt := sort.SearchStrings(validTZ, value)
if foundAt < len(validTZ) && validTZ[foundAt] == value {
valid = true
}

Expand Down

0 comments on commit f55f9f9

Please sign in to comment.