return this;
}
public ValidationResult validate() {
clearValidationMarking();
ValidationResult result = new ValidationResult();
if (validators == null) {
return result;
}
T value;
try {
value = editor.getValue();
} catch (TextConversionException tce) {
ValidationResult validationResult = new ValidationResult(tce.getMessage());
markValid(validationResult);
result.merge(validationResult);
return result;
}
for (Validator<T> validator : validators) {
ValidationResult validationResult = validator.validate(value);
markValid(validationResult);
result.merge(validationResult);
if (!validationResult.isValid()) {
break;
}
}
return result;
}