Problem with Validators

Hi all (and sorry for my english)

I have a problem with my validator:

	class MoreThanDateValidator implements Validator {
		Date date;
		public void validate(Object value) throws InvalidValueException {
			SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");
			if (!isValid(value))
			{
				logger.debug("!isValid, value: " + value);
				throw new InvalidValueException("input the date more than "
						+ sdf.format(date));
			}
		}
		MoreThanDateValidator(Date _date) {

			date = _date;
		}
		public boolean isValid(Object value) {
			logger.debug("isValid, value: " + value);
			if (date == null)
				return true;
			if (value == null)
				return true;
			Date curDate = (Date) value;
			return (curDate.after(date) || curDate.equals(date));
		}
	}

This validator must validate dateFields. It works ok, but error message don’t hide when I input right value.
example:
a date in validator: 10.10.2010
an input value: 07.10.2010
message: input the date more than 10.10.2010
new input value 12.10.2010
press commit
message didn’t hide… (but commiting was worked)

help me to understand this problem please, thanks.

I solved the problem. I set field.setInvalidAllowed(true); and problem was solved.
But I cannot understand why. Any ideas?

This is related to
ticket #6407
, fixed in the 6.6 branch just hours ago.

The default value of this setting for DateField was inconsistent with other fields, and caused validation errors to propagate differently (also depending on the write-through mode of the field).