vue-form-builder
vue-form-builder copied to clipboard
Impossible to turn off validation error alert
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;
}
}