Hi, As I said the simplest is to just use form.error("the.key"):
@Override public void validate(Form<?> form) { Date fromDate = fromDateFormComponent.getConvertedInput(); Date toDate = toDateFormComponent.getConvertedInput(); if ( fromDate != null && toDate != null && fromDate.after(toDate)) { form.error(getClass().getSimpleName() + "." + "fromDateAfterToDate"); } } Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Oct 2, 2014 at 12:30 AM, msalman <mohammad_sal...@yahoo.com> wrote: > Well, I wanted these to be independent validation classes. But now it > seems > like a bad idea. I will make them part of the form. > > Martin, your comments and help are much appreciated. > > Thanks. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/FormValidators-and-messages-property-file-tp4667767p4667790.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >