original_string: protected function validateFieldAddress($field)
      {
          if ($this->isExcluded($field) || $this->isError('country')) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          $format = $this->getCountryFormatAddress();
  
          if (empty($format[$field]['required'])) {
              return null;
          }
  
          if (!isset($value) || $value === '' || mb_strlen($value) > 255) {
              $this->setErrorLengthRange($field, $format[$field]['name'], 1, 255);
              return false;
          }
  
          return true;
      }
code: protected function validateFieldAddress($field)
      {
          if ($this->isExcluded($field) || $this->isError('country')) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          $format = $this->getCountryFormatAddress();
  
          if (empty($format[$field]['required'])) {
              return null;
          }
  
          if (!isset($value) || $value === '' || mb_strlen($value) > 255) {
              $this->setErrorLengthRange($field, $format[$field]['name'], 1, 255);
              return false;
          }
  
          return true;
      }
code_tokens: protected function validateFieldAddress ( $ field ) { if ( $ this -> isExcluded ( $ field ) || $ this -> isError ( 'country' ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) && ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } $ format = $ this -> getCountryFormatAddress ( ) ; if ( empty ( $ format [ $ field ] [ 'required' ] ) ) { return null ; } if ( ! isset ( $ value ) || $ value === '' || mb_strlen ( $ value ) > 255 ) { $ this -> setErrorLengthRange ( $ field , $ format [ $ field ] [ 'name' ] , 1 , 255 ) ; return false ; } return true ; }
docstring: Validates an address field associated with the country format
  @param string $field
  @return bool|null
docstring_tokens: Validates an address field associated with the country format