Carsten Ziegeler wrote:
Carsten Ziegeler wrote:

Reinhard Poetz wrote:

no, but the interface ValidationErrorAware has and it is implemented by most model implementations.

What's your usecase?

I just want to check if a widget is valid and then output something in
an own transformer. Ok, I could cast it to ValidationErrorAware but it
seems a little bit strange to have a validate() method on the widget but
no isValid() method.

So anyone against it?

While on the subject of forms validation... I noticed several very annoying 
things:

 * Field.getValidationError() *does not* simply return validation error:
   it has side effects!!! It calls getValue() which can invoke parsing
   and validation - depending on state, resulting in weird behavior.

 * Field.setValidationError() *does not* simply set validation error:
   it *also* has side effects!!! For some reason it changes widget state,
   which can results in weird behavior.

Any objections on fixing these violations as well?

Vadim

Reply via email to