protected function validateCombinationPriceProduct($index, &$combination)
    {
        $price = $this->getSubmitted('price');

        if (empty($combination['price'])) {
            $combination['price'] = $price;
        }

        if (!is_numeric($combination['price']) || strlen($combination['price']) > 10) {
            $error = $this->translation->text('Only numeric values and no longer than @num characters', array('@num' => 10));
            $this->setError("combination.$index.price", $error);
        }

        return !isset($error);
    }
protected function validateCombinationPriceProduct($index, &$combination)
    {
        $price = $this->getSubmitted('price');

        if (empty($combination['price'])) {
            $combination['price'] = $price;
        }

        if (!is_numeric($combination['price']) || strlen($combination['price']) > 10) {
            $error = $this->translation->text('Only numeric values and no longer than @num characters', array('@num' => 10));
            $this->setError("combination.$index.price", $error);
        }

        return !isset($error);
    }
protected function validateCombinationPriceProduct ( $ index , & $ combination ) { $ price = $ this -> getSubmitted ( 'price' ) ; if ( empty ( $ combination [ 'price' ] ) ) { $ combination [ 'price' ] = $ price ; } if ( ! is_numeric ( $ combination [ 'price' ] ) || strlen ( $ combination [ 'price' ] ) > 10 ) { $ error = $ this -> translation -> text ( 'Only numeric values and no longer than @num characters' , array ( '@num' => 10 ) ) ; $ this -> setError ( "combination.$index.price" , $ error ) ; } return ! isset ( $ error ) ; }
Validates combination stock price
@param integer $index
@param array $combination
@return boolean
Validates combination stock price