diff --git a/storybook/stories/ExampleAddressList.tale.vue b/storybook/stories/ExampleAddressList.tale.vue
index f010758..6d51450 100644
--- a/storybook/stories/ExampleAddressList.tale.vue
+++ b/storybook/stories/ExampleAddressList.tale.vue
@@ -42,7 +42,7 @@
v-slot="{ context }"
class="col col-auto px-2 mb-3"
name="building"
- validation="^required|number"
+ validation="^required|alphanumeric"
>
+
+
+
+
@@ -91,14 +101,18 @@ export default {
data: () => ({
values: {
- addressList: [],
+ addressList: [{
+ street: 'Baker Street',
+ building: '221b',
+ }],
},
}),
created () {
this.$formulario.extend({
validationMessages: {
- number: () => 'Value is not a number',
+ alphanumeric: () => 'Value must be alphanumeric',
+ number: () => 'Value must be a number',
required: () => 'Value is required',
},
})
@@ -111,6 +125,10 @@ export default {
building: '',
})
},
+
+ removeAddress (index) {
+ this.values.addressList.splice(index, 1)
+ },
},
}
@@ -119,4 +137,8 @@ export default {
.field {
max-width: 250px;
}
+
+.remove-btn-wrapper {
+ padding-top: 32px;
+}
diff --git a/storybook/stories/FormularioGrouping.tale.vue b/storybook/stories/FormularioGrouping.tale.vue
deleted file mode 100644
index d42333a..0000000
--- a/storybook/stories/FormularioGrouping.tale.vue
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
diff --git a/storybook/stories/index.stories.js b/storybook/stories/index.stories.js
index c0c491d..930afb9 100644
--- a/storybook/stories/index.stories.js
+++ b/storybook/stories/index.stories.js
@@ -6,7 +6,6 @@ import Vue from 'vue'
import VueFormulario from '../../dist/formulario.esm'
import ExampleAddressList from './ExampleAddressList.tale'
-import FormularioGrouping from './FormularioGrouping.tale'
Vue.mixin({
methods: {
@@ -22,4 +21,3 @@ Vue.use(VueFormulario)
storiesOf('Examples', module)
.add('Address list', () => ExampleAddressList)
- .add('FormularioGrouping', () => FormularioGrouping)