Sylvain Wallez wrote:

Vadim Gritsenko wrote:

Sylvain Wallez wrote:

Having validators on all widgets seems to be a must have since it allows to perform higher-level validation on e.g. repeaters, forms, etc. Currently, a validation rule is supposed to return a ValidationError which is attached to the widget invoking the validation rule.

This has several problems:
- not all widgets can provide visual feedback for a validation error, i.e. a form, a repeater or a class.



It can be fixed with styling change, and/or with a patch I suggested a while ago. I can commit it, I still have it (<wd:validation-error/> tag)



Mmmh... it may make sense for _some_ widgets other than fields, but does it make sense for _all_ widgets, like non-visual widgets like "class", "switch", etc?


My "ValidationErrorAware" proposal allows us to add validation errors on the widgets we want to, but doesn't _require_ it. So I think I'll go that way, which will allow us to progressively add validation errors on widgets where it makes sense.


Hmmm.... Don't go, run! ;-)

I'm just saying that it might make sense to have ValidationErrors on a Form itself. You might be right about "class", etc, I'm not up-to-speed on those.

Vadim

Reply via email to