Transcript from the "Markup-based vs. Model-based" Lesson
>> Evan You: The next topic is Form Validation. So, before we go into the actual code, I want to talk about that. Form Validation, in terms of components, there are two schools of thought, different styles, I would say. So one of them is markup-based and the other is model-based. So vee-validate and vuelidate are two of the probably most popular form of validation plugins in the vue ecosystem, and they take two different approaches.
[00:00:34] Markup-based means the rules for validating a form field is directly declared in the template along with the element Itself. Similar to how html form elements allows you to do things like inputs. Main length equals 5 or max length equals 20. Everything is sort of on the component directly there.