]> source.dussan.org Git - archiva.git/commitdiff
[MRM-521]
authorMaria Odea B. Ching <oching@apache.org>
Mon, 15 Oct 2007 03:59:21 +0000 (03:59 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Mon, 15 Oct 2007 03:59:21 +0000 (03:59 +0000)
- added range validation for the repository purge fields

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@584665 13f79535-47bb-0310-9956-ffa450edef68

archiva-web/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryAction-validation.xml
archiva-web/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryAction-validation.xml
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp

index 39941570d772fa4668e1e81924bbaea25566ada6..0852feab10bbc330e41da00cf79ca90ec6829e0c 100644 (file)
     <field-validator type="requiredstring">
       <message>You must enter a repository name.</message>
     </field-validator>
+  </field>   
+  <field name="repository.retentionCount">
+       <field-validator type="int">
+       <param name="min">1</param>
+        <param name="max">100</param>
+               <message>Repository Purge By Retention Count needs to be between ${min} and ${max}.</message>
+       </field-validator>    
+  </field>
+   <field name="repository.daysOlder">
+       <field-validator type="int">
+       <param name="min">0</param>
+        <param name="max">1000</param>
+               <message>Repository Purge By Days Older Than needs to be between ${min} and ${max}.</message>
+       </field-validator>    
   </field>
 </validators>
\ No newline at end of file
index 39941570d772fa4668e1e81924bbaea25566ada6..d82bb772b98c52ce66c3166dc28c67fa837c93da 100644 (file)
       <message>You must enter a repository name.</message>
     </field-validator>
   </field>
+  <field name="repository.retentionCount">
+       <field-validator type="int">
+       <param name="min">1</param>
+        <param name="max">100</param>
+               <message>Repository Purge By Retention Count needs to be between ${min} and ${max}.</message>
+       </field-validator>    
+  </field>
+   <field name="repository.daysOlder">
+       <field-validator type="int">
+       <param name="min">1</param>
+        <param name="max">1000</param>
+               <message>Repository Purge By Days Older Than needs to be between ${min} and ${max}.</message>
+       </field-validator>    
+  </field>
 </validators>
\ No newline at end of file
index 98a050a05ddec9803a8c8e19728248aa31feaf92..55bbda15106fcfe72e0b660d3639978a6e26b0aa 100644 (file)
@@ -39,7 +39,7 @@
   </ww:form>
 
   <script type="text/javascript">
-    document.getElementById("addRepository_id").focus();
+    document.getElementById("addRepository_repository_id").focus();
   </script>
 
 </div>