public set_message ( $lang, $val = '' ) : CI_Form_validation | ||
return | CI_Form_validation |
public function set_message($lang, $val = '')
{
if (!is_array($lang)) {
$lang = array($lang => $val);
}
$this->_error_messages = array_merge($this->_error_messages, $lang);
return $this;
}
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.'); }