cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duncan McLean" <>
Subject Custom validation in form
Date Wed, 25 Jan 2006 16:28:46 GMT

I have a partial forms definition which calls a server-side date checking
JS function (validateDate), which returns true or false depending on
validity of supplied string - this seems to pass validation in the form,
no matter what I enter (the function returns true/false correctly as
checked through log file).

How can I get the validation to work?

Snippet from form def:

		<fd:aggregatefield id="dob1" required="true">
			<fd:label>Date of Birth</fd:label>
			<fd:datatype base="string"/>

				  var tmp = validateDate(widget.getValue());
				  java.lang.System.out.println("true or false? " + tmp);
				  return tmp;



Do I have to set the validation error against the dob1 widget? If so how
do I do this? Or am I doing this the wrong way?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message