continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsm...@apache.org
Subject svn commit: r755063 - /continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/
Date Tue, 17 Mar 2009 01:08:18 GMT
Author: wsmoak
Date: Tue Mar 17 01:08:18 2009
New Revision: 755063

URL: http://svn.apache.org/viewvc?rev=755063&view=rev
Log:
[CONTINUUM-2130] Add conditional validation to check that both the email address and latest
committers checkbox are not blank.
According to the docs [1] this should be a <validator> and not a <field-validator>
but that didn't work at all.
Currently the validation is working and it will not let you save the form without either an
address or the checkbox, however the error message does not display.

[1] http://struts.apache.org/2.0.14/struts2-core/apidocs/com/opensymphony/xwork2/validator/Validator.html

Modified:
    continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction-mailProjectGroupNotifierSave-validation.xml
    continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction.properties
    continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction-mailProjectNotifierSave-validation.xml
    continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction.properties

Modified: continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction-mailProjectGroupNotifierSave-validation.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction-mailProjectGroupNotifierSave-validation.xml?rev=755063&r1=755062&r2=755063&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction-mailProjectGroupNotifierSave-validation.xml
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction-mailProjectGroupNotifierSave-validation.xml
Tue Mar 17 01:08:18 2009
@@ -23,6 +23,16 @@
 
 <validators>
   <field name="address">
+    <field-validator type="expression">
+      <param name="expression">
+        ! (
+          ( address eq "" )
+          and
+          ( committers eq "" )
+          )
+      </param>
+      <message key="mailNotifier.address.required"/>
+    </field-validator>
     <field-validator type="regex">
       <param name="expression"><![CDATA[(^[_A-Za-z0-9-\&]+[\&_A-Za-z0-9-+]*(\.[_A-Za-z0-9-+\&]+)*@([A-Za-z0-9-\&])+(\.[A-Za-z0-9-]+)*((\.[A-Za-z0-9]{2,})|(\.[A-Za-z0-9]{2,}\.[A-Za-z0-9]{2,}))$)]]></param>
       <message key="mailNotifier.address.invalid"/>

Modified: continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction.properties?rev=755063&r1=755062&r2=755063&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailGroupNotifierEditAction.properties
Tue Mar 17 01:08:18 2009
@@ -17,5 +17,5 @@
 # under the License.
 #
 
-mailNotifier.address.required = Address is required
+mailNotifier.address.required = You must either provide an address, or select to notify latest
committers.
 mailNotifier.address.invalid = Address is invalid

Modified: continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction-mailProjectNotifierSave-validation.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction-mailProjectNotifierSave-validation.xml?rev=755063&r1=755062&r2=755063&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction-mailProjectNotifierSave-validation.xml
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction-mailProjectNotifierSave-validation.xml
Tue Mar 17 01:08:18 2009
@@ -23,6 +23,16 @@
 
 <validators>
   <field name="address">
+    <field-validator type="expression">
+     <param name="expression">
+        ! (
+          ( address eq "" )
+          and
+          ( committers eq "" )
+          )
+     </param>
+     <message key="mailNotifier.address.required"/>
+    </field-validator>
     <field-validator type="regex">
       <param name="expression"><![CDATA[(^[_A-Za-z0-9-\&]+[\&_A-Za-z0-9-+]*(\.[_A-Za-z0-9-+\&]+)*@([A-Za-z0-9-\&])+(\.[A-Za-z0-9-]+)*((\.[A-Za-z0-9]{2,})|(\.[A-Za-z0-9]{2,}\.[A-Za-z0-9]{2,}))$)]]></param>
       <message key="mailNotifier.address.invalid"/>

Modified: continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction.properties?rev=755063&r1=755062&r2=755063&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/notifier/MailProjectNotifierEditAction.properties
Tue Mar 17 01:08:18 2009
@@ -17,5 +17,5 @@
 # under the License.
 #
 
-mailNotifier.address.required = Address is required
+mailNotifier.address.required = You must either provide an address, or select to notify latest
committers.
 mailNotifier.address.invalid = Address is invalid



Mime
View raw message