// load the standard FacileForms library
$this->execPieceByName('ff_InitLib');

// check attempt to post with invalid security code
if (ff_getSubmit('seccode') != JFactory::getSession()->get('ff_seccode','')) {
    $this->status = 1000; // our custom error code
    $this->message = "Invalid security code.";
} // if