I use db dataobject, and thus quickform. I got stuck with a problem. want to set a validation at the client side to check a file name extension. Can't find a way out.
the field is like:
'pathname' => array(
'type' => 'varchar',
'size' =>255,
'qf_type'=> 'text',
'require' => false,
'qf_client' => true,
'qf_rules' = array('required' => 'file name is required.'),
);
now I want a validation to check whether the extension of the file matches with some specific format with the help of regular expression.
If any one has idea please share.
The problem was solved setting pathname['qf_rules']['regex'].