I am trying to set error validation for strn and is needed to follow this strict rule,but as I am unaware of how to use callback functionality, can anybody help me in setting up the form validation for the same?
$this->form_validation->set_rules('strn', 'STRN', 'trim|callback_strn_check');
and the strict rules are:-
The STRN is a unique 15 digit number.
1st ten digits are PAN number of the Assessee
11th & 12th is the Service Tax Code (Its is either ST or SD)
One more important point is that this field is not mandatory, yet if user fills it inappropriately, then he should receive a form error.