Ratnakar, oIdentical should be an array containing all the objects that should be validated for the current validator. This function (identical()) is dynamically generated from your form and field definitions in validation.xml. You will need to loop through the oIdentical array and perform your validation on each of these objects. I don't recall offhand what data is in the objects, but you should be able to figure out a bit from the existing validators.
For example, it looks like the actual html form field from the page is contained in the object, and could be referenced like this: form[oIdentical[x][0]] Where x is the index of the field. (0 would be the first field to validate, 1 the second, etc.) You can also reference the field arguments and variables if you have those defined. I hope this helps, Andy -----Original Message----- From: Ratnakar Parakala [mailto:[EMAIL PROTECTED] Sent: Thursday, August 12, 2004 1:14 AM To: [EMAIL PROTECTED] Subject: Validator - Javascript question Hi, I tried to write custom validation rule called "identical". But, if I give oIdentical = new identical(); I didn't get any client side alert messages. Hope this statement doesn't generate necessary javascript code when the rule is configured and executed. I'm using Struts 1.2.1 (Beta). Could sombody tell me the use of oTwoFields = new twofields(); statement and how struts uses this statement to generate client side javascript. Thanx in advance, Ratnakar --------------------------------- Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]