protected function validateDecimalsCurrency()
    {
        $field = 'decimals';
        $value = $this->getSubmitted($field);

        if (!isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        if (preg_match('/^[0-2]+$/', $value) !== 1) {
            $this->setErrorInvalid($field, $this->translation->text('Decimals'));
            return false;
        }

        return true;
    }
protected function validateDecimalsCurrency()
    {
        $field = 'decimals';
        $value = $this->getSubmitted($field);

        if (!isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        if (preg_match('/^[0-2]+$/', $value) !== 1) {
            $this->setErrorInvalid($field, $this->translation->text('Decimals'));
            return false;
        }

        return true;
    }
protected function validateDecimalsCurrency ( ) { $ field = 'decimals' ; $ value = $ this -> getSubmitted ( $ field ) ; if ( ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } if ( preg_match ( '/^[0-2]+$/' , $ value ) !== 1 ) { $ this -> setErrorInvalid ( $ field , $ this -> translation -> text ( 'Decimals' ) ) ; return false ; } return true ; }
Validates currency decimals
@return boolean|null
Validates currency decimals