Q:

codeigniter form validation with define CONSTANT

i define a constant in /application/config/abc.php
define('MINI_LENGTH', 5);

then in the /application/controllers/abc.php
$config_form = array(array(
    'field' => 'name',
    'label' => 'First name',
    'rules' => 'trim|required|min_length[MINI_LENGTH]'),

it is not working and i got an error message :
"The xxx field must be at least MINI_LENGTH characters in length."
which part did i missed out or done wrongly? thanks.

A:

Try   
$config_form = array(array(
     'field' => 'name',
     'label' => 'First name',
     'rules' => 'trim|required|min_length['.MINI_LENGTH.']'), 

I haven't tested it though

