Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted August 3, 20177 yr foreach( $this->value as $k => $v ) { $class = new $classType( $this->name .'_validate', $v, FALSE, $this->options, $this->customValidationCode, $this->prefix, $this->suffix); $class->validate(); } parent::validate(); Has new change refer to \IPS\Helpers\Form\Stack::validate ? this code take same $this->customValidationCode closure for each $this->value and \IPS\Helpers\Form\_FormAbstract::validate if( $this->customValidationCode !== NULL ) { call_user_func( $this->customValidationCode, $this->value ); } Why this? how I can manage for a function same closure (into secure purpose, one is Stack::validate array() and another formabstract::validate have multidimensional array 2 level array(0=>array(),1=>array().......)? EDIT: I think is better give a option for check "each" value like: foreach( $this->value as $k => $v ) { $class = new $classType( $this->name .'_validate', $v, FALSE, $this->options, $this->options['validate'], $this->prefix, $this->suffix); $class->validate(); }
Archived
This topic is now archived and is closed to further replies.