clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressTown")));
clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressStreet")));
clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressHouse")));
//Combining scenarios
OrConstraint searchConstraint = new OrConstraint();
searchConstraint.addConstraint(clientNameConstraint);
searchConstraint.addConstraint(clientPersonalIdConstraint);
searchConstraint.addConstraint(clientAddressConstraint);
//Setting custom error message
searchConstraint.setCustomErrorMessage(t("searchform.notenoughdata"));
//Setting constraint
searchForm.setConstraint(searchConstraint);
//Putting the widget