Hi i want to edit my validation_errors function that it will always have a div around it. Im using bootstrap and there is a nice way to show errors with Dismissable alerts Look here
I have found the function validation_errors() in system/helpers/form_helper.php which looks like:
if ( ! function_exists('validation_errors'))
{
function validation_errors($prefix = '', $suffix = '')
{
if (FALSE === ($OBJ =& _get_validation_object()))
{
return '';
}
return $OBJ->error_string($prefix, $suffix);
}
}
How can i edit it that it returns :
<div class="alert alert-danger alert-dismissable">
errors here
</div>
I know i shouldn't do it in a helper class because its bad when i update my codeigniter version, but i really do not know how it can be done in a diffrent way.