How to override default validation failure presentation?

In the validation example,

http://www.smartclient.com/index.jsp#valueTransform

validation failures are shown in-line, within the DynamicForm. Is there a function or technique to override this and instead present a dialog (via isc.say() for example) to show the validation error message?

Thanks
Pete

Hi Pete,
There are a few ways this could be done. One option is to override ‘setErrors()’ to simply display the errors directly to the user rather than storing them on the form to be displayed inline:

isc.DynamicForm.create({
    ID: "boundForm",
    dataSource: "valueTransform",
    setErrors : function (errors) {
        var hasErrors = false,
             errorString = "Validation Errors Occurred";
        for (var field in errors) {
          hasErrors = true;
          errorString += "<br> - " + field + ":" + errors[field];
       }
       if (hasErrors) isc.warn(errorString);
    }
});

isc.Button.create({
    top: 60,
    title: "Validate",
    click: "boundForm.validate()"
});

Let us know if this works for your application.

Thanks
Isomorphic Software