Problem with auto validation in form

Hi there,

I’m having research about Vaadin’s Form. And I meet a problem when validate form. The problem is I don’t want fields in my form auto validate when I input value to them, the validation must only work when I click on save button. I tried to use setValidationVisibleOnCommit(false) with form and setValidationVisible(false) (as I see in this article
Require field validation and empty form
) with my fields, but it doesn’t work.

See my form as attachment, the validation is sum of value1,2,3,4 must be less or equal to Sum Value.

Please help or guide me to the right

Thanks and Best regards
Tam Nguyen

Anyone have any idea about this ?
I find out that if I replace these combo boxes by textfields, the form will only validate when I click save (right behavior that I need). What happens with combo box, something is wrong with them ? :(.
Please help

I dig out some more about ComboBox and find this article:
Problems with ComboBox and Form in immediate=false, writeThrough=false

Is it true ? :frowning:

The immediate flag does not mean that updates should never be sent immediately - it is just a hint to the framework to enable optimizing data transfer, but the framework may send any messages as immediate, and all queued non-immediate requests will “piggy-back” on the next immediate request.

That said, maybe there is a problem or a limitation with the validation system that becomes apparent here, although I believe setValidationVisible(false) (possibly needed on both the form and the field for hiding two different validation error messages/indicators) should work in these cases. Please verify e.g. with a breakpoint that these are not overridden later by the field generator or some other mechanism.

Hi Mr Henri,
I don’t think there are any other overridden by the field generator or some other mechanism (and I already setValidationVisible(false) to both form and field). Please see image attach about my debug. Actually, my problem is the same with Fabio in linked article I found above: The validation of Value(x) field is not validated when its value changed (–> OK), but it validates when value of Value(x-1) or Value(x+1) changed (–> Not OK).

Thanks for answering me