← Back to team overview

dhis2-devs team mailing list archive

Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen

 

In this case I must agree with Viet. Validation becomes unusable without
user feedback. Firstly user feedback is a presentation thing - it should not
be mixed with the business logic concern. Secondly it is technically
problematic to return user feedback from the business (model) layer - using
exceptions is bad practice and return values should be reserved for the
purpose of the method.

Struts2 offers similar functionality to Spring WebMVC, where validation
happens in a method on the controller and is invoked right after the action
is invoked. Struts2 also offer AJAX-validation of fields on-the-fly. But
that is a major rewrite...

Lars

Follow ups

References