How do I get validation errors from within a form group

336 Views Asked by At

When using Vue Formulate, if you have a form group with nested form fields, how do you get the errors on those form fields?

If I bind a handler to the parent form, like this:

<formulate-input @validation="myValidationEvent"> ...

If I log the output from that event to the console, the output for a normal form field looks this this:

{name: 'personalDetails', errors: Array(1), hasErrors: true}

where errors is an array containing the errors. But if I do the same for a form group, I get this:

{name: 'personalDetails', errors: Array(0), hasErrors: true}

Note the empty errors array. How do I get to the errors on the form fields nested inside the group?

Thanks!

0

There are 0 best solutions below