You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a template user, when I'm interactively entering input values and I enter a value that fails validation, I want to find out immediately and try again, rather than continuing and failing later.
There's some trickiness here. A validation rule might reference multiple inputs, like rule: 'bool(inputA) || bool(inputB). We can't evaluate this expression until we have values for both inputA and inputB. In the worse case, every rule might reference every variable.
One idea that might be possible: look at the CEL ASTs to see what identifiers they reference (this might be possible using ReferenceInfo). Using that data, we could try one of these ideas:
Change the order that we prompt for inputs so that we prefer to prompt for inputs whose validation rules only reference inputs that are already available.
Divide the validation rules into two kinds: (1) those that only look at their own single input value, and (2) those that look at other input values. Execute the "kind 1" rules immeditely, but wait until all inputs have been collected before running the "kind 2" rules.
As a template user, when I'm interactively entering input values and I enter a value that fails validation, I want to find out immediately and try again, rather than continuing and failing later.
There's some trickiness here. A validation rule might reference multiple inputs, like
rule: 'bool(inputA) || bool(inputB)
. We can't evaluate this expression until we have values for both inputA and inputB. In the worse case, every rule might reference every variable.One idea that might be possible: look at the CEL ASTs to see what identifiers they reference (this might be possible using ReferenceInfo). Using that data, we could try one of these ideas:
cc @gjonathanhong
The text was updated successfully, but these errors were encountered: