moeen-basra / ree-validate

Simple React.js input validation plugin extended from vee-validate
MIT License
16 stars 4 forks source link

Validating Dynamically added elements #8

Closed mnksingh1996 closed 5 years ago

mnksingh1996 commented 5 years ago

Versions:

Description:

Currently i have an array of exams such as -

examName - examScore - Add/Delete

One can add more exams to the list along with thier score and remove or add them and i need to validate them. Right now we need to initialize the bag so i can't validate them dynamically. Is there any alternative to this?

moeen-basra commented 5 years ago

you can use the attach method of validator on add new exam this.validator.attach({name: examName, rules: xxx})

on remove this.validator.detach(examName)