Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

Support custom validators for non-required fields #8

Description

@kevinoid

The fact that errors for non-required fields are ignored can really limit the utility of custom validators. It would be great if express-form could either integrate some mechanism for custom validators on non-required fields or non-field-specific/multi-field validation.

The particular use case that I have in mind is to be able to check for conditionally required fields. For example, field2 is required if field1 is provided (or if field1 has a particular value). I didn't see a way to implement this sort of logic in the current design and it would be very useful for me at the moment.

Thanks for considering,
Kevin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions