I wish to implement form level validation, and was wondering that the recommended approach is ?

 

I would like to be able to do this validation before Form.onSubmit() – since I would like to prevent the model from being updated in the case of invalid input.

 

Form.validate() is final.  So either this needs to be changed, or a different soloution could be implemented :

 

Some ideas :

 

1)       validate() could call a new template method validateForm().

2)       enhance Form to support adding IFormValidator instances, and process them after processing the form components’s IValidator instances.

 

Cameron.

 

Reply via email to