[eluser]CroNiX[/eluser]
That looks like it should be fine.
You can always extend the form validation library with your own rules and then they don't become callbacks, to see if that works.
Just create:
/application/libraries/MY_Form_validation.php
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Form_validation extends CI_Form_validation
{
function __construct()
{
parent::__construct();
}
function video_check($str)
{
$this->set_message('video_check', 'Only YouTube Videos Are Accepted At This Time');
return FALSE;
}
}
Then just call the rule like a native CI rule
Code:
$this->form_validation->set_rules('url', 'URL', 'required|video_check');