koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
548 stars 155 forks source link

How to trigger validation of single section #204

Closed mahabubhossain closed 3 years ago

mahabubhossain commented 3 years ago

I have multiple sections in a form. Now i want users to move next section only if current section is valid.

So how can we programmatically check validation of single section. On the documentation the validation is triggered for whole form. But my requirement is to validate the form by each section.

Also we should be able to if current section is dirty or not.

albanm commented 3 years ago

Same as other issue. This feels like an attempt at create a proper v-stepper that was added in the meantime.

scheepers commented 3 years ago

Similar issue here and unfortunately the stepper does not work for it. Is there some way to validate a single field or section (and display its errors)?

I've tried digging into the source, but alas my vue & vuetify kung-fu is not yet strong enough to be able to self-help.

scheepers commented 3 years ago

There is an (undocumented) validate method on vuetify inputs that shows errors when called:

input.validate(true)