<script type="text/javascript">
$(function(){
{foreach from=$params item=param}
$('[name={$param}]').addClass('valid');
{/foreach}
});
</script>
<div class="p5">
    <div class="bg-danger">
        {foreach from=$errors item=error}
        <div class="p5">{$error}</div>
        {/foreach}
    </div>
</div>