Author: andyhot
Date: Fri Mar 16 19:32:02 2007
New Revision: 519219

URL: http://svn.apache.org/viewvc?view=rev&rev=519219
Log:
TAPESTRY-410: Getting ready for match-differ validator

Modified:
    
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js

Modified: 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js?view=diff&rev=519219&r1=519218&r2=519219
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js 
(original)
+++ 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js 
Fri Mar 16 19:32:02 2007
@@ -250,5 +250,20 @@
        isPalleteSelected:function(elem){
                if (elem.length > 0) { return true; }
                return false;
-       }
+       },
+
+        /**
+         * Validates that the input value is equal with the value of the given 
input control.
+         */
+        isEqual:function(value, other) {
+                var otherValue = dojo.byId(other).value;
+                return value == otherValue;
+        },
+
+        /**
+         * Validates that the input value is not equal with the value of the 
given input control.
+         */
+        isNotEqual:function(value, other) {
+            return !tapestry.form.validation.isEqual(value, other);
+        },
 }


Reply via email to