protected function validateTypeAddress()
    {
        $field = 'type';
        $value = $this->getSubmitted($field);

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

        if (!in_array($value, $this->address->getTypes())) {
            $this->setErrorUnavailable($field, $this->translation->text('Type'));
            return false;
        }

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

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

        if (!in_array($value, $this->address->getTypes())) {
            $this->setErrorUnavailable($field, $this->translation->text('Type'));
            return false;
        }

        return true;
    }
protected function validateTypeAddress ( ) { $ field = 'type' ; $ value = $ this -> getSubmitted ( $ field ) ; if ( ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } if ( ! in_array ( $ value , $ this -> address -> getTypes ( ) ) ) { $ this -> setErrorUnavailable ( $ field , $ this -> translation -> text ( 'Type' ) ) ; return false ; } return true ; }
Validates an address type
@return boolean|null
Validates an address type