diff --git a/src/index.js b/src/index.js index dd017988..8c2501c1 100644 --- a/src/index.js +++ b/src/index.js @@ -5,9 +5,11 @@ const fieldComponents = require("./utils/fieldsLoader").default; const abstractField = require("./fields/abstractField").default; const install = (Vue, options) => { Vue.component("VueFormGenerator", module.exports.component); - if(options && options.validators) { - for(let key in options.validators) { - validators[key] = options.validators[key]; + if (options && options.validators) { + for (let key in options.validators) { + if ({}.hasOwnProperty.call(options.validators, key)) { + validators[key] = options.validators[key]; + } } } };