sethsandaru / vue-form-builder

Super Form Builder built on top of Vue with Drag & Drop functionality, savable-form-schema and easy to maintain/upgrade your form.
http://vue-form-builder.sethphat.com
MIT License
413 stars 129 forks source link

Custom validation closure does not exist and is bypassed #115

Open dvuckovic opened 2 years ago

dvuckovic commented 2 years ago

Following custom validation closure tutorial in the documentation results in a console error.

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

function myCustomValidation(fieldValue: string, valuesContainer: {}) {
  return fieldValue === 'Seth Phat';
}

Vue.use(VueFormBuilderPlugin, {
  validationClosures: {
    'sethPhatCustomCheck': myCustomValidation
  }
});
Custom Validation Closure sethPhatCustomCheck does not exists. Bypassed

It seems like the custom closure is ignored, i.e. it doesn't get applied or is not reachable by the validator code.