>>>>> "Bruno" == Bruno Dumon <[EMAIL PROTECTED]> writes:
Bruno> This is probably because your fd:validation is inside your
Bruno> fd:datatype (where did you find that? I thought all
Bruno> examples and docs were updated)
They probably are - I missed the / at the end of the datatype line:
<fd:field id="yourmail">
<fd:datatype base="string"/>
<fd:validation>
Works better now.
But not correctly:
var success = true;
var start_time = widget.lookupWidget("../start-time");
if (start_time.value = "") {
widget.setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("Start-time must be
specified along with finish-time", false));
success = false;
}
// Must return true/false
return success;
My test:
if (start_time.value = "") is no good as I get:
org.mozilla.javascript.JavaScriptException: at foo
(file:/home/colin/onevoice/members/forms/event-form.xml, Line 51):
java.lang.RuntimeException: Incorrect value type for "events.0.start-time" (expected
class java.util.Date, got class java.lang.String).
I tried changing the "" to null, but then I don't get a validation
error.
What is the corect way to discover that the user has not typed
anything in the start-time field?
--
Colin Paul Adams
Preston Lancashire
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]