integer
validator:string
validator, with custom validation messages:validator:
property to its schema. The value of this property can be a function or a string, or an array of functions or strings.validators.<function_name>
, i.e. this is equivalent to the above example:validator: "string"
is just shorthand for validator: validators.string
.value
, field
, model
parameters - and return either an array of errors, or an empty array if validation succeeds.Vue.use()
when setting up VFG in your project. This will take each function in the object passed and attach it to the list of built-in validators. This allows you to reference your custom validators as "name strings" (convenient for JSON schemas retrieved remotely).vue-form-generator
component emits a validated event, if validation is executed. The event parameters are: isValid: boolean, errors: Array
. Full details of handling validation events.validateDebounceTime
option to a positive integer, then all validation will be delayed by this amount of time in milliseconds.validateDebounceTime
field property instead.