Project

General

Profile

WFormModel validation

Added by Maximilian Kleinert over 4 years ago

Hi,

I was looking at the integration example: https://www.webtoolkit.eu/widgets/forms/integration-example

When I enter valid data into every field and press save, I see for a moment everything green and then the "has-success" style class was removed except for the remark WTextArea item.

Looking at the comment in the code in the `void process()` function there is

// Udate the view: Delete any validation message in the view, etc.
updateView(model.get());

in case of a valid input.

I thought that on a validation failure the valid fields are displayed green and the invalid fields are displayed red.

On the contrary I thought that if everything is valid there should be no validation markups? (Or all marked green and not partially)

In this example there is no validator attached to the remarks field.

I have the same problem were I used a WSlider as an control. I tried to add a validator which return always `true` but that did not help.

BR

Max


Replies (1)

RE: WFormModel validation - Added by Maximilian Kleinert over 4 years ago

If I click the Save button again, everything is green.

BR

Max

    (1-1/1)