Vue Modified Example


Gender

   
Form Status
Description Usage Value
Form status vm.$modified();
vm.$touched();
MODIFIED TOUCHED
Group name modified/touched vm.$modified('name');
vm.$touched('name');
MODIFIED TOUCHED
Group gender modified/touched vm.$modified('gender');
vm.$touched('gender');
MODIFIED TOUCHED
Vue Data vm.$data.form

                    
Reset Modified State
If your form uses AJAX or is reset by the user, you can also reset the modified state of the form. By resetting the state it will set all fields to show as modified: false and the internal variable that stores the starting value of the field will be updated to the current value. You can also reset the state based on group name instead of the entire form.

Usage

vm.$resetModified(); - Entire form
vm.$resetModified('someGroup'); - By group name

Example

Reset Form State Reset "name" State Reset "gender" State

Heavily modified and gutted version of Vue Validator by Radovan Lozej.

View on GitHub

Vue Modified - vm.$data.vmodified