<?php 

//organizing rules into sets
//example
$config = array(
                 'signup' => array(
                                    array(
                                            'field' => 'username',
                                            'label' => 'Username',
                                            'rules' => 'required'
                                         ),
                                    array(
                                            'field' => 'password',
                                            'label' => 'Password',
                                            'rules' => 'required'
                                         ),
                                    array(
                                            'field' => 'passconf',
                                            'label' => 'PasswordConfirmation',
                                            'rules' => 'required'
                                         ),
                                    array(
                                            'field' => 'email',
                                            'label' => 'Email',
                                            'rules' => 'required'
                                         )
                                    ),
                 'email' => array(
                                    array(
                                            'field' => 'emailaddress',
                                            'label' => 'EmailAddress',
                                            'rules' => 'required|valid_email'
                                         ),
                                    array(
                                            'field' => 'name',
                                            'label' => 'Name',
                                            'rules' => 'required|alpha'
                                         ),
                                    array(
                                            'field' => 'title',
                                            'label' => 'Title',
                                            'rules' => 'required'
                                         ),
                                    array(
                                            'field' => 'message',
                                            'label' => 'MessageBody',
                                            'rules' => 'required'
                                         )
                                    )                          
               );  
			  
	$config = array(	
				 'user_management/insert_user/2' => array(
				 						array(
												'field' => 'corporation_name',
												'label' => 'Corporation Name',
												'rules' => 'required'
											 ),
										array(
												'field' => 'email_address',
												'label' => 'Email Address',
												'rules' => 'valid_email'
											 ),
										array(
												'field' => 'first_name',
												'label' => 'First Name',
												'rules' => 'required|alpha'
											 ),
										array(
												'field' => 'phone_no',
												'label' => 'Phone Number',
												'rules' => 'required|numeric|exact_length[9]'
											 ),
										array(
												'field' => 'other_names',
												'label' => 'Other Names',
												'rules' => 'required'
											 ),
										array(
												'field' => 'national_id_no',
												'label' => 'National ID NO',
												'rules' => 'required|is_numeric'
											 )
										),
									         
            
           'user_management/insert_user/3' => array(
                                    array(
                                            'field' => 'email_address',
                                            'label' => 'Email Address',
                                            'rules' => 'valid_email'
                                         ),
                                    array(
                                            'field' => 'first_name',
                                            'label' => 'First Name',
                                            'rules' => 'required|alpha'
                                         ),
									array(
                                            'field' => 'phone_no',
                                            'label' => 'Phone Number',
                                            'rules' => 'required|numeric|exact_length[9]'
                                         ),
                                    array(
                                            'field' => 'other_names',
                                            'label' => 'Other Names',
                                            'rules' => 'required'
                                         ),
									array(
                                            'field' => 'national_id_no',
                                            'label' => 'National ID NO',
                                            'rules' => 'required|is_numeric'
                                         )
										)
									);         
            
?>