code: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
  
  		ActionErrors errors = null;
  		// has the maximum length been exceeded?
  		Boolean maxLengthExceeded = (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
  		if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue())) {
  			errors = new ActionErrors();
  			errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new ActionMessage("maxLengthExceeded"));
  		} else if (fileMap.size() > MAX_IMAGES_COUNT) {
  			errors = new ActionErrors();
  			errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new ActionMessage("maxLengthExceeded"));
  		} else {
  			// retrieve the file name
  			Iterator iter = fileMap.values().iterator();
  			while (iter.hasNext()) {
  				FormFile file = (FormFile) iter.next();
  				String fileName = file.getFileName();
  				if ((!fileName.toLowerCase().endsWith(".gif")) && !(fileName.toLowerCase().endsWith(".jpg"))
  						&& !(fileName.toLowerCase().endsWith(".png"))) {
  					errors = new ActionErrors();
  					errors.add("notImage", new ActionMessage("notImage"));
  				}
  			}
  		}
  		return errors;
  	}
docs: Check to make sure the client hasn't exceeded the maximum allowed upload
  size inside of this validate method.