<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

class Cf_Form_validation extends CI_Form_validation
{
    protected $CI;

    public function __construct()
    {
        parent::__construct();
        $this->CI = &get_instance();
    }

    public function run($module = '', $group = '')
    {
        is_object($module) and $this->CI = &$module;
        return parent::run($group);
    }

    public function alpha_dash_dots($value)
    {
        $this->CI->form_validation->set_message(
            'alpha_dash_dots',
            'The %s field may only contain alpha characters, dots or dashes',
        );
        return (bool) preg_match('/^[a-zA-z.\- 0-9]+$/', $value);
    }
}
/* End of file Cf_Form_validation.php */
/* Location: ./application/libraries/Cf_Form_validation.php */
