Validates a document by executing the default value, translation, and validation formulas, if any are defined in the document form.
public boolean computeWithForm(boolean dodatatypes, boolean raiseerror)
throws NotesException
boolean dodatatypes
The method ignores this parameter. Specify either true or false.
boolean raiseerror
If true, an error is raised if the validation fails. If false, no error is raised; instead, the method returns false if validation fails.
The form is as follows:
In the user interface, you must use a form to create a document. The document must meet the form requirements for input validation, and the user interface informs you if the document does not meet these requirements. Programatically you can create a document without a form. The computeWithForm method provides a means of checking that the data you placed in a document meets the requirements of a form, although (unlike in the user interface) you can still save a document if computeWithForm returns false or throws an exception.
ComputeWithForm method in LotusScript NotesDocument class
@IsValid function in formula language
.
See examples