Jump to content

\IPS\Helpers\Form\Stack::validate 4.2 bug?


BomAle

Recommended Posts

		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();
}

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...