AquaLogic Interaction Development Kit (IDK) 6.0.0 |

# IPresentationTemplateManager.ValidateTemplateText Method

Validates the PCS tag syntax in the template text and returns an array of strings indicating the syntax errors or an empty array if there are no errors.

string[] ValidateTemplateText(
IPresentationTemplate presentationTemplate,
string templateText
);

#### Parameters

presentationTemplate
  The Presentation Template to validate the PCS tag syntax against. The Presentation Template must be live (persisted and not deleted).
templateText
  The template PCS tag text to be validiated; cannot be `null`.

#### Return Value

A string array that indicates each syntax error in the template text or an empty array if there are no errors.

#### Remarks

This method does not guarantee proper PCS tag evaluation at publishing time.

This method will only validate PCS tags. It will not validate html or xml syntax. The template text of a Presentation Template can contain one or more PCS tags which are part of the Publisher Templating Language syntax.

Refer to the Administrator Guide for AquaLogic Interaction Publisher for more details about PCS tags and sample template text values.

If validate returns no errors the template text can be set for a Presentation Template. The template text is used to determine the layout of a content item when it is published.

An example using ValidateTemplateText can be found in the documentation for IPresentationTemplateManager.

#### Exceptions

Exception Type | Condition
--- | ---
InvalidOperationException | The presentationTemplate is not yet stored or was deleted.
ContentException | The method call resulted in a Publisher exception.
SoapException | There was a communication problem during the execution of the remote method call.

#### See Also

IPresentationTemplateManager Interface | Plumtree.Remote.PRC.Content.PresentationTemplate Namespace