Skip to content

Setting to make 'optional' state default? #1247

@alystair

Description

@alystair

Whilst reviewing the documentation it seems having everything set as 'optional' was the default in older releases - I'm finding in my own use cases is that this would be preferred, as wrapping v::optional around almost every validator is way too verbose.

Are there plans to add a setting to make things optional by default? If there are not, what would be the pref. way to extend the validator to make such a setting? Eg. v::allOptional(true);

Somewhat related - the documentation for validating object attributes does not mention the (ironically optional) 'mandatory' boolean.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions