Built in validate of title when using EntryModel? The example below will continue to save entries with the same title and slug.

Is there a built in validation when using craft()-&gt;entries-&gt;saveEntry?

$entry = new EntryModel();
$entry-&gt;sectionId = $sectionId;
$entry-&gt;getContent()-&gt;setAttributes(array(
            'title' =&gt; '123',
        ));
$re = craft()-&gt;entries-&gt;saveEntry($entry);
You could hook into the entries.beforeSaveEntry event like this:

craft()-&gt;on('entries.beforeSaveEntry', function (Event $e) {

    // Get the entry we're saving, and it's title
    $entry = $e-&gt;params['entry'];
    $title = $entry-&gt;getContent()-&gt;title;

    // Look for existing entries with the same title
    $existingEntry = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry, [
      'title' =&gt; $title,
      'id' =&gt; $entry-&gt;id ? 'not '.$entry-&gt;id : null
    ])-&gt;first();

    // If an existing entry is found, prevent saving and pass an error message
    if ($existingEntry) {
      $entry-&gt;addErrors([
        'title' =&gt; Craft::t("An entry titled $title already exists"),
      ]);
      $e-&gt;performAction = false;
    }
});