Skip Navigation

Programmatic Marketing Content

control-j is the search shortcutj
Introduction to Programmatic Marketing Content
AMPscript
Guide Template Language
Server-Side JavaScript
Server-Side JavaScript Syntax Guide
Account Functions
AccountUser Functions
Content Area Functions
Data Extension Functions
DateTime Functions
Delivery Profile Functions
Email Functions
Add
Check Content
Remove
Retrieve
Update
Validate
Events Functions
Filter Defintion Functons
Folder Functions
HTTP Functions
List Functions
Portfolio Functions
Query Definition Functions
Recipient Functions
Send Classification Functions
Send Functions
Sender Profile Functions
Subscriber Functions
Template Functions
Triggered Send Functions
Utilities Functions
Platform Functions
Server-Side JavaScript Sample Code
Use Server-Side JavaScript with AMPscript
Use Server-Side Javascript via WSProxy with the SOAP API
Server-Side JavaScript/Server-Side JavaScript Syntax Guide/Email Functions/Validate

Validate

Overview

Runs validation checks on the initialized email and returns a JSON object indicating the result of the validation and any identified issues

Syntax

Validate()

Example

This sample code calls Validate() on the initialized email object and writes out the results from the returned JSON object:

var myEmail = Email.Init("myEmail");
var results = myEmail.Validate();
Write(results.Task.ValidationStatus);
Write(results.Task.ValidationMessages);
Last Updated: Jun 8, 2021

Salesforce logo