// Rule: first two digits of PIN must match last two digits of the year of
// birth
public void validatePinDob(ComponentSystemEvent event) {
UIForm form = (UIForm) event.getComponent();
UIInput pin = (UIInput) form.findComponent("pesel");
UIInput dob = (UIInput) form.findComponent("dob");
if (pin.getValue() != null && dob.getValue() != null
&& pin.getValue().toString().length() >= 2) {
String twoDigitsOfPin = pin.getValue().toString().substring(0, 2);