Quote Originally Posted by lat9 View Post
Recursion: See recursion.


Hoping to finish the code for this tonight.

The data structure for defining the sanitization would be

PHP Code:
        $group = array(
            
'update_products' => array(
                
'sanitizerType' => 'MULTI_DIMENSIONAL',
                
'method' => 'post',
                
'pages' => array('edit_orders'),
                
'params' => array(
                    
'update_products' => array('sanitizerType' => 'CONVERT_INT'),
                    
'qty' => array('sanitizerType' => 'CONVERT_INT'),
                    
'name' => array('sanitizerType' => 'WORDS_AND_SYMBOLS_REGEX'),
                    
'onetime_charges' => array('sanitizerType' => 'SIMPLE_ALPHANUM_PLUS'),
                    
'attr' => array(
                        
'sanitizerType' => 'MULTI_DIMENSIONAL',
                        
'params' => array(
                            
'attr' => array('sanitizerType' => 'CONVERT_INT'),
                            
'value' => array('sanitizerType' => 'CONVERT_INT'),
                            
'type' => array('sanitizerType' => 'CONVERT_INT')
                        )
                    ),
                    
'model' => array('sanitizerType' => 'WORDS_AND_SYMBOLS_REGEX'),
                    
'tax' => array('sanitizerType' => 'SIMPLE_ALPHANUM_PLUS'),
                    
'final_price' => array('sanitizerType' => 'SIMPLE_ALPHANUM_PLUS'),
                )
            )
        ); 
It should be noted that you don't necessarily have to go to this level of sanitizing, but I feel it should be available.

My most recent changes are here
https://github.com/zcwilt/zc-v1-seri...9ff41070bab641
however that doesn't yet have code to do the MULTI_DIMENSIONAL recursion.