protected function validateMajorUnitCurrency()
    {
        $field = 'major_unit';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

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

        if (empty($value) || mb_strlen($value) > 50) {
            $this->setErrorLengthRange($field, $this->translation->text('Major unit'), 1, 50);
            return false;
        }

        return true;
    }
protected function validateMajorUnitCurrency()
    {
        $field = 'major_unit';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

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

        if (empty($value) || mb_strlen($value) > 50) {
            $this->setErrorLengthRange($field, $this->translation->text('Major unit'), 1, 50);
            return false;
        }

        return true;
    }
protected function validateMajorUnitCurrency ( ) { $ field = 'major_unit' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) && ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } if ( empty ( $ value ) || mb_strlen ( $ value ) > 50 ) { $ this -> setErrorLengthRange ( $ field , $ this -> translation -> text ( 'Major unit' ) , 1 , 50 ) ; return false ; } return true ; }
Validates currency major unit
@return boolean|null
Validates currency major unit