set_message() public method

Lets users set their own error messages on the fly. Note: The key name has to match the function name that it corresponds to.
public set_message ( $lang, $val = '' ) : CI_Form_validation
return CI_Form_validation
Ejemplo n.º 1
0
 function __construct($config = array())
 {
     parent::__construct($config);
     parent::set_message('numeric_positive', 'The {field} field must contain a decimal greater or equal than 0.');
     parent::set_message('image_base64', 'The {field} field must be a image in base64 format.');
     parent::set_message('valid_base64', 'The {field} field must be base64 data.');
 }