Thank you. I did not really mean "DatePicker" I just take "MyDatePicker" for example , because it has cross-field validation ( If month==FEB , day <=28 for average year ; day<=29 for leap year) My custom object structure and validation is more complicated , not related to DatePicker.
I just want to know , if there is a MyDatePicker , that year/month/day are all TextFields , how do I the cross-field validation ??? I didn't find any example about the cross-field validation. The validators in wicket.markup.html.form.validation.* are all per-field validator , can somebody give me an example of cross-field validator ?? I think I shouldn't use FormValidator , because MyDatePicker is not a form ; MyDatePicker is embed in a form , with other fields included , such as username , password , title ...etc. Again , as I mentioned , "MyDatePicker" is just an example , not related to wicket's DatePicker. I think it is a good example about cross-field validation... 2006/6/12, Johan Compagner <[EMAIL PROTECTED]>: > a validator needs to be added to a FormComponent. > You could do it with a FormValidator but that is more a validator that goes > over multiply formcomponents > (like equals input or check if you filled in one of the fields (required > over x number of fields not only one field) > > Is that validator always there for your DatePicker or is it a standalone > validator that > you sometimes use for a datepicker? > If you always want to have a validator with youre special datepicker > Then you just extend the datapicker and in the constructor add your > validator. > > Please make a but report about that javadoc that is out of sync so that we > can look at it. > _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user