1
0
Fork 0
mirror of synced 2025-04-03 05:13:34 +03:00
vue-formulario/src/libs/handler.js
Justin Schroeder adf8299a33
Feature/form errors (#13)
* Adds support form FormulateError form errors

* Adds support for form-errors prop

Also includes tests for both named-form-errors as well, form-errors prop, positioning form errors with the <FormulateErrors /> component, and allowing multiple <FormulateErrors />

* Adds form error support, error handling, and supporting tests

* Remove unused util functions

* fixes bug that resulted in validation failing if run more than once

Credit to @luan-nk-nguyen for discovering the bug

Co-authored-by: Andrew Boyd <andrew@wearebraid.com>
2020-03-06 16:10:25 -05:00

11 lines
309 B
JavaScript

/**
* The default backend error handler assumes a failed axios instance. You can
* easily override this function with fetch. The expected output is defined
* on the documentation site vueformulate.com.
*/
export default function (err) {
if (typeof err === 'object' && err.response) {
}
return {}
}