Cristhyan D. Marchena
Cristhyan D. Marchena
Hi @abdullahIsa, taking into account my tests with this behavior you would need to play around with the hook to handle this scenario properly. I've found out that if you...
Hi! Having a `.when` would be awesome! it would simplify the logic to define conditional rules or rules that depend on another field. It would be ✨Awesome✨ to know the...
[Here's an idea I had](https://github.com/fabian-hiller/valibot/issues/5#issuecomment-1709410445) to add a workaround of `.when()` as a pipeline method for the `object` schema, as an example a schema with `when` would look like: ```ts...
@fabian-hiller It sounds really helpful for most co-dependent input field validations that I can think of! But I do agree with @xsjcTony, it seems that the `pipeline` methods passed on...
Yeah in all the scenarios I'm currently working on the validations are more like the first example of `when('sibling', ...)` based. And I agree with it being typed as `Record`,...
The most common examples that I've been working on are `sibling` based validations: ```ts const SomeSchema = object({ ...fields }, [ fieldRequiredWhen( { field: { key: 'someField', is: (field) =>...
Also, I thought of a grouped validation for some fields sharing the `required` validation `when` a `sibling` has some value: ```ts const SomeSchema = object({ ...fields }, [ fieldsRequiredWhen( {...
The only issue that I currently have with the provided examples above are the runtime issues in which theses validations are only visible to a user if all of the...
@Demivan By non-pipeline solution are you referring to the one that's not within the `pipeline` for the `object` schema? I'm asking since both examples from @fabian-hiller are within a `pipeline`,...