thesmythgroup / vue-toolkit

Completely style-able, fully accessible UI components, built with Vue.
https://thesmythgroup.github.io/vue-toolkit/
MIT License
2 stars 1 forks source link

Dynamic Validation Schema #30

Open adamcoots opened 2 years ago

adamcoots commented 2 years ago

Describe the Feature

Currently, validation schema is set only once when the component loads.

Allow validation schema to be dynamic, potentially passing a computed property to validate based on conditions. Ex:

schema = {
  phone: this.phone ? [validators.minLength(10)] : [],
}