commit
9aedaa1b0e
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,3 +6,5 @@ coverage
|
||||
.vscode
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
*.dev.tale.vue
|
||||
*.dev.stories.js
|
||||
|
@ -167,7 +167,7 @@ export default class Formulario {
|
||||
* Given an array, this function will attempt to make sense of the given error
|
||||
* and hydrate a form with the resulting errors.
|
||||
*/
|
||||
handle (error: any, formName: string, skip: boolean = false) {
|
||||
handle (error: any, formName: string, skip = false) {
|
||||
// @ts-ignore
|
||||
const e = skip ? error : this.options.errorHandler(error, formName)
|
||||
if (formName && this.registry.has(formName)) {
|
||||
@ -184,7 +184,7 @@ export default class Formulario {
|
||||
/**
|
||||
* Reset a form.
|
||||
*/
|
||||
reset (formName: string, initialValue: Object = {}) {
|
||||
reset (formName: string, initialValue: Record<string, any> = {}) {
|
||||
this.resetValidation(formName)
|
||||
this.setValues(formName, initialValue)
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ import Registry from '@/libs/registry'
|
||||
import FormSubmission from '@/FormSubmission'
|
||||
import FormularioInput from '@/FormularioInput.vue'
|
||||
|
||||
import { ErrorObserver } from '@/validation/types'
|
||||
|
||||
@Component({ name: 'FormularioForm' })
|
||||
export default class FormularioForm extends Vue {
|
||||
@Provide() formularioFieldValidation (errorObject): void {
|
||||
|
@ -63,7 +63,7 @@ export default class FormularioInput extends Vue {
|
||||
@Prop({
|
||||
type: [String, Boolean, Array],
|
||||
default: false,
|
||||
}) validation
|
||||
}) validation!: string|any[]|boolean
|
||||
|
||||
@Prop({
|
||||
type: [String, Boolean],
|
||||
|
Loading…
Reference in New Issue
Block a user