v2.0.0-beta5
Pre-release
Pre-release
Break changes
Removed deprecated fields. #121
If you are using text
, number
, color
, email
, password
or range
field type in schema, please change it to input
and set the type into inputType
property. Example:
Old way
{
type: "text"
},
{
type: "number"
}
New way
{
type: "input"
inputType: "text"
},
{
type: "input"
inputType: "number"
}
Created two separated & renamed bundle file: full
and core
#121
Core is a more minimal version with only half the fields.
Full is core + other fields.
- Full bundle: 75 kB (gzipped: 19 kB)
- Core bundle: 39 kB (gzipped: 11 kB)
If you don't know what to choose, don't worry, the full is the default version.
If you want the slim down version, here is the changes:
// the "core" way
<script>
import VueFormGenerator from "vue-form-generator/dist/vfg-core.js";
import "vue-form-generator/dist/vfg-core.css";
</script>
Validation error handling changed #128 #109
- VFG component emits a
validated
event, if validation executed. Event parameters:isValid: boolean, errors: Array
Example:
<vue-form-generator @validated="onValidated" />
...
methods:{
onValidated(isValid, errors) {
console.log("Validation result: ", isValid, ", Errors:", errors);
}
}
- Fields validation
schema.errors
issue is fixed. Nowerrors
in the local data. The communication with parent is event-based (similar@validated
solution) - Fix
this
in schema functions. Nowthis
is always the instance of vfg. Parameters:model, fieldSchema, vfg