Upon installation of the vuelidate.js.org
package for VueJs
, I implemented the following validator script:
}), Validations: {
name: {
required, minLength: minLength(3), maxLength: maxLength(50)
},
family: {
required, minLength: minLength(3), maxLength: maxLength(50)
},
website: {
required, minLength: minLength(3), maxLength: maxLength(50)
},
instagram_page: {
required, minLength: minLength(3), maxLength: maxLength(50)
},
telegram_id: {
required, minLength: minLength(3), maxLength: maxLength(50)
},
}
Although validators can be defined for individual form fields, is there a way to group them together?
In the provided code snippet, it is evident that the same validator is being used for all form fields. How can this be achieved with a single validator declaration?