PDA

View Full Version : Validator Bug



TheBuzzer
25 Aug 2008, 9:43 AM
I have a validator set up as this


inhanddate.setValidator(new Validator() {

public String validate(Field inhanddate, String value) {
if (value.equals("")) {
return null;
} else if (orderdate.getValue().compareTo((Date) inhanddate.getValue()) > 0) {
return "In-Hand Date Must Be After Order Date";
} else if (estimatedshipdate.getValue() != null) {
if (estimatedshipdate.getValue().compareTo((Date) inhanddate.getValue()) > 0) {
return "In-Hand Date Must Be After Estimated Ship Date";
} else {
return null;
}
} else {
return null;
}
}
});


There is a bug in the validator where if I return a different error message it does not update and shows the old error message.