From: Dan B. <da...@ch...> - 2002-03-13 18:40:10
|
+1 ;) On Wed, 2002-03-13 at 13:10, Anthony Eden wrote: > Greetings all, > > Dan and I have been discussing ways to simplify the validation part of the FormProc API. The main issue is with the > fact that group validators and element validators are currently treated as separate validator types. This leads to > confusing configuration files, more classes, etc. Dan suggested that all element validators should be just considered a > group of 1. After some discussion back and forth we agreed upon the following validator API: > > public abstract ValidationResult validate(FormElement[] formElements, FormData[] formData) throws Exception; > > Then, validators can either validate each element in the array individually using the same algorithm, or validators > could look at the data as a single entity (i.e. the group validator behavior as it is currently defined.) > > There will also be a change from the current behavior with respect to how forms are processed. Currently the form data > received dictates which elements are processed. The new behavior will be that all elements defined in the form's XML > configuration file will be processed, thus catching cases where no value is received from the client (and perhaps > failing out because of that.) This leads me to the question: what to with submitted data where there is no validator? > The current behavior would just not validate and would only try to call the target object's write method with the data. > If this is OK, I will keep this behavior. > > Any opinions? This will of course break the API once again, but it would greatly simplify it as well. If you see any > problems with this new design please speak your piece now before I go forward with the changes. > > Sincerely, > Anthony Eden > > > _______________________________________________ > FormProc-developer mailing list > For...@li... > https://lists.sourceforge.net/lists/listinfo/formproc-developer > |