CodeIgniter Forums
How do you extend the Form Validation library? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: How do you extend the Form Validation library? (/thread-40072.html)



How do you extend the Form Validation library? - El Forum - 03-29-2011

[eluser]JasonS[/eluser]
All I want to do is update the prefix..

Code:
<?php

class MY_Form_validation extends CI_Form_validation {

    var $_error_prefix            = '<p class="error">';
    
}

Nothing happens..


How do you extend the Form Validation library? - El Forum - 03-29-2011

[eluser]danmontgomery[/eluser]
http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html#errordelimiters

Code:
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');