return FileUploadForm.class.equals(aClass);
}
public void validate(Object object, Errors errors) {
if (this.supports(object.getClass())) {
FileUploadForm form = (FileUploadForm) object;
if (form.getUploadDir() == null || form.getUploadDir().trim().equals("")) {
errors.rejectValue("uploadDir", OtherErrorCodes.NO_DIR_CODE, "No directory specified!");
}
if (form.getFile() == null || form.getFile().isEmpty()) {
errors.rejectValue("file", OtherErrorCodes.NO_FILE_CODE, "No file selected!");
}
}
}