adonisjs / validator

Schema based validator for AdonisJS
MIT License
116 stars 39 forks source link

added equalTo rule #98

Closed popovicieduard closed 4 years ago

popovicieduard commented 4 years ago

Proposed changes

added equalTo rule as discussed here: https://github.com/adonisjs/core/discussions/1475#discussioncomment-52260

Types of changes

Checklist

thetutlage commented 4 years ago

I believe we should add support for refs, otherwise the rule is pretty much useless. The refs are required for using dynamic values inside the schema

popovicieduard commented 4 years ago

added the functionality, forgot to add the adonis-typings, commiting right now.

thetutlage commented 4 years ago

Nice. Can you please also add one test using refs? Also, it will be nice, if you can open a parallel PR for the docs too.

popovicieduard commented 4 years ago

Sure

popovicieduard commented 4 years ago

PR for docs created: https://github.com/adonisjs/adonisjs.com/pull/97

thetutlage commented 4 years ago

Thanks 😄