<?php

use Jet\MVC_View;
use Jet\Form_Renderer_Field_Error;

/**
 * @var MVC_View $this
 * @var Form_Renderer_Field_Error $r
 */
$r = $this->getRaw( 'renderer' );

$field = $r->getField();

if( !$field->getLastErrorMessage() ) {
	return;
}

if( !$r->getBaseCssClasses() ) {
	$r->setBaseCssClass( 'error' );
}
?>
<div <?=$r->renderTagAttributes()?>>
	<?= $field->getLastErrorMessage(); ?>
</div>
