dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03840
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
2009/12/23 Lars Helge Øverland <larshelge@xxxxxxxxx>
>
> 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
>
>
Well, having dedicated methods for validation in the service layer could
work... like validateDataElement( DataElement ) with constant string return
types which could be mapped to user-friendly messages in the presentation
layer. I see Bob's point of reusing those methods for other input sources.
References
-
[Bug 430657] [NEW] Date text field needs validation rule in form area or data entry screen
From: Brajesh, 2009-09-16
-
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
From: Hieu Dang Duy, 2009-12-22
-
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
From: Saptarshi Purkayastha, 2009-12-22
-
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
From: Hieu Dang Duy, 2009-12-23
-
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
From: Lars Helge Øverland, 2009-12-23
-
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
From: Bob Jolliffe, 2009-12-23
-
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
From: Jason Pickering, 2009-12-23
-
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
From: Viet Nguyen, 2009-12-23
-
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
From: Saptarshi Purkayastha, 2009-12-23
-
Re: [Bug 430657] Re: Date text field needs validation rule in data entry screen
From: Lars Helge Øverland, 2009-12-23