Index: lams_common/src/java/org/lamsfoundation/lams/util/FileValidatorUtil.java
===================================================================
diff -u
--- lams_common/src/java/org/lamsfoundation/lams/util/FileValidatorUtil.java (revision 0)
+++ lams_common/src/java/org/lamsfoundation/lams/util/FileValidatorUtil.java (revision 4ae89955463ce8f525ce7cb7c473e0dc8c2432ff)
@@ -0,0 +1,75 @@
+/**
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.util;
+
+import org.apache.struts.validator.Resources;
+import org.apache.commons.validator.ValidatorAction;
+import org.apache.commons.validator.Field;
+import org.apache.struts.action.ActionMessages;
+import org.apache.commons.validator.Validator;
+import org.apache.commons.validator.GenericValidator;
+import org.apache.commons.validator.util.ValidatorUtils;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.struts.upload.FormFile;
+
+/**
+ * This class is used by commons validator. To validate various properties
+ * related to any uploaded files
+ *
+ * @author Anthony Xiao
+ */
+public class FileValidatorUtil {
+
+ /**
+ * To enable this validator copy the XML entry below to validator-rules.xml
+ *