Validates a document by executing the default value, translation, and validation formulas, if any are defined in the document form.
flag = notesDocument.ComputeWithForm( doDataTypes, raiseError )
doDataTypes
Boolean. The method ignores this parameter. Specify either True or False.
raiseError
Boolean. If True, an error is raised if the validation fails. If False, no error is raised; instead, the method returns False if validation fails.
Notes determines the form for the document using:
In the Notes user interface, you must use a form to create a document. The document must meet the form's requirements for input validation, and the user interface informs you if the document does not meet these requirements. With the Notes classes, you can create a document without a form. The ComputeWithForm method provides a means of checking that the data you've placed in a document meets a form's requirements, although (unlike in the user interface) you can still save a document if the ComputeWithForm returns False or raises an error.
When you create a new document, however, no form item exists in the back-end. To avoid having ComputeWithForm fall back to the default form, put a Form field on your form when you create it. That way, you start with something in the back-end, and you get the expected results from your new document. Otherwise, you can get results from fields that exist only in the default form, but not the document you create.
computeWithForm method in Java Document class
@IsValid in formula language
See examples