diff --git a/schema.go b/schema.go index 4a815acfe2a2c0d63318635e253afbf9cb5bf9ec..460620b99085730ea5914e6b274f2aebce964890 100644 --- a/schema.go +++ b/schema.go @@ -28,7 +28,7 @@ } unified := constraints.Unify(config) if unified.Err() != nil { - err := unified.Validate(cue.Concrete(true), cue.Final()) + err := unified.Validate(cue.Concrete(true)) var errs []string for _, e := range errors.Errors(err) { errs = append(errs, e.Error()) diff --git a/testdata/array_constraints.cue b/testdata/array_constraints.cue index cbddedf8ce9845994345a2cafcf5e27de5a0296f..8ffac2cdfa35d4a3e9f1e2739a102808077a6841 100644 --- a/testdata/array_constraints.cue +++ b/testdata/array_constraints.cue @@ -1,7 +1,7 @@ -import "time" +#Duration: string & =~"^([0-9]+(ns|us|µs|ms|s|m|h))+$" s: [string, string] i: [int, int, int] b: [bool, bool] -d: [time.Duration, time.Duration] +d: [#Duration, #Duration] x: [string, string, string] diff --git a/testdata/bad.cue b/testdata/bad.cue index 5236ab6a31788d122ccadd20fc6293763f5688d2..fef8a31e53d5914ca81b3baa8c425654d962a138 100644 --- a/testdata/bad.cue +++ b/testdata/bad.cue @@ -1,4 +1,4 @@ s: 1 i: "1" b: 1 -d: "1d" +d: 1 diff --git a/testdata/constraints.cue b/testdata/constraints.cue index 87ba7977f1f8b08dd5620e1c0ad9dd20626fecc3..e41e0f82ab0868c9dc125529709b755786844dab 100644 --- a/testdata/constraints.cue +++ b/testdata/constraints.cue @@ -1,6 +1,6 @@ -import "time" +#Duration: string & =~"^([0-9]+(ns|us|µs|ms|s|m|h))+$" s: string i: int b: bool -d: time.Duration +d: #Duration