poppinss / indicative

Indicative is a simple yet powerful data validator for Node.js and browsers. It makes it so simple to write async validations on nested set of data.
https://indicative.adonisjs.com/
MIT License
417 stars 52 forks source link

Add expected value for requiredIf #214

Closed jettcalleja closed 5 years ago

jettcalleja commented 5 years ago

Proposed changes

This is inspired to laravel's requiredIf functionality wherein the field under validation must be present and not empty if the anotherfield field is equal to any value.

Types of changes

What types of changes does your code introduce?

Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

thetutlage commented 5 years ago

Yup, looks like a great addition

thetutlage commented 5 years ago

Thanks 😄