Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Impossible to turn off validation error alert #113

Open
dvuckovic opened this issue Dec 31, 2021 · 0 comments
Open

Impossible to turn off validation error alert #113

dvuckovic opened this issue Dec 31, 2021 · 0 comments

Comments

@dvuckovic
Copy link

Although the documentation does make a reference of the validationErrorShowAlert option, any "falsy" values suplied for it will be ignored by the plugin. Effectively, this means the error alert can not be turned off.

To reproduce, try the following while installing the plugin:

import { VueFormBuilderPlugin } from 'v-form-builder';

Vue.use(VueFormBuilderPlugin, {
  // This will be ignored due to a bug in VueFormBuilder plugin.
  validationErrorShowAlert: false,
});

A quick-n-dirty workaround would be to explicitly set this option before using form renderer component inside a Vue component. This can be done via exposed $form property on the Vue instance. For example:

@Component
export default class FormRenderer extends Vue {
  created() {
    // Disable built-in validation error alert in VueFormBuilder.
    this.$form.validationErrorShowAlert = false;
  }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant