diff --git a/src/components/my-form.vue b/src/components/my-form.vue
index cbaf8ef..7f7ba2a 100644
--- a/src/components/my-form.vue
+++ b/src/components/my-form.vue
@@ -8,9 +8,10 @@
:placeholder="item.placeholder"
:type="item.type"
v-model="formData[key]"
- @validate="validateData(key)">
+ @validate="validateData(key)"
+ :invalid="formErrors[key]"
+ >
- required
@@ -85,10 +86,4 @@ export default {
}
}
}
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/components/my-input.vue b/src/components/my-input.vue
index edd385b..23a2b5c 100644
--- a/src/components/my-input.vue
+++ b/src/components/my-input.vue
@@ -9,16 +9,28 @@
:name="name"
:placeholder="placeholder"
@blur="validate()"
- @change="() => $emit('change', currentValue)">
+ @change="() => $emit('change', currentValue)"
+ :class="{invalid}"
+ >
$emit('change', currentValue)">
+ @change="() => $emit('change', currentValue)"
+ :class="{invalid}"
+ >
+
+
+
+