vaadin / proposal-for-vaadin-form

Small and fast framework-agnostic library for creating forms with Web Components
Apache License 2.0
9 stars 0 forks source link

disable & re-enable validation #1

Open OlliTietavainenVaadin opened 5 years ago

OlliTietavainenVaadin commented 5 years ago

Use case: I want to make a form that can be saved temporarily ("interrupt save") before the final submission. This means that I want to turn off the validation temporarily so that even invalid data can be submitted. Once the user is ready to submit, it should be possible to re-enable the form's validation.

Legioth commented 5 years ago

What does "submission" mean in this context? Would it be enough that there would be a way of extracting a raw value out from the form regardless of whether validation passes?

OlliTietavainenVaadin commented 5 years ago

What does "submission" mean in this context?

In Binder terms, that would be writeBean.

Would it be enough that there would be a way of extracting a raw value out from the form regardless of whether validation passes?

That's one half of it. The other half would be being able to put that raw value programmatically back into the form without triggering a validation exception.