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
First of all, thank you for providing such a useful utility <3
In my scenario: I want to validate an optional username and password, but also say that if there is one without the other, the validation should fail. E.g. allow configuration against a resources that allows authenticated and unauthenticated requests. One can opt to add user/pass, or not user/pass, but if the provide user/pass, BOTH have to be there.
This can be solved in a transform function, which is what I’m going with for now, but something like this would be nice:
This is just to sketch what this could look like. Using an array of depends could open this up to more than two dependent variables. Although having to make the dependency on both sides will explode maintenance complexity quickly.
Alternatively, maybe this can be done with grouping:
First of all, thank you for providing such a useful utility <3
In my scenario: I want to validate an optional username and password, but also say that if there is one without the other, the validation should fail. E.g. allow configuration against a resources that allows authenticated and unauthenticated requests. One can opt to add user/pass, or not user/pass, but if the provide user/pass, BOTH have to be there.
This can be solved in a
transform
function, which is what I’m going with for now, but something like this would be nice:This is just to sketch what this could look like. Using an array of depends could open this up to more than two dependent variables. Although having to make the dependency on both sides will explode maintenance complexity quickly.
Alternatively, maybe this can be done with grouping:
where
group
is an arbitrary label, but the semantics are: if one of the values is missing, validation fails.Another variant would be explicit grouping:
The text was updated successfully, but these errors were encountered: