Skip to content

Using optionality and asynchronous rules in the same chain  #206

@rationalquality

Description

@rationalquality

I would like to be able to write something like this chain of validations:

v8n().optional(v8n().email().checkEmailAvailable())

email – regular rule for email validation (pattern)
checkEmailAvailable – async rule

But right now it's not possible because inside optional rule we use .check strategy.

Is there a chance that this behavior can be implemented?

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions