User Guide
Global document functions 323
Description
Runs the Validator on a single specified document (this function is similar to
site.runValidation()). The Validator checks the document for conformance with the language
specified in the document doctype (such as HTML 4.0 or HTML 3.2) and the language
specified by the server model (such as ColdFusion or ASP). If the document has no doctype,
then the Validator uses the language setting specified in the Validator section of the
Preferences dialog box.
Arguments
{controlString}, {bOpenResultsWindow}, {bShowInfoMessage}
■ The controlString argument is an optional string with four possible values: an empty
string,
"xml", "auto-explicit", or "auto-implicit".
■ If the argument is an empty string, the Validator performs a default validation. If the
argument is
"xml", the Validator validates the document as XML.
■ If the argument is "auto-explicit" or "auto-implicit", Dreamweaver performs
an automatic validation (also known as an inline validation), which underlines errors
in the Code view instead of opening the Validation results window (see
“dom.source.getValidationErrorsForOffset()” on page 533 and
“dom.getAutoValidationCount()” on page 525).
■ If the controlString argument is "auto-explicit", Dreamweaver will prompt the
user to save an unsaved document before running the validation.
■ If the controlString argument is "auto-implicit", the validation will fail without
notifying the user that the current document is unsaved.
■ The bOpenResultsWindow argument is an optional Boolean value: true opens the
Validation results window; false otherwise. The default value is
true.
■ The bShowInfoMessage argument is used only when the controlString argument is
defined as
"auto-explicit" or "auto-implicit". The bShowInfoMessage argument is
a Boolean value:
true shows an informational message under the toolbar item,
DW_ValidatorErrors, with the number of errors found; false displays nothing. The
default value is
false.
Returns
The Validation results window object.
NOTE
An automatic validation (defined by the controlString value "auto-explicit" or
"auto-implicit") is currently available only for a Target Browser Check.
000_DW_API_Print.book Page 323 Wednesday, July 20, 2005 11:58 AM