protected function validateDataMapStore()
    {
        $field = 'data.map';
        $value = $this->getSubmitted($field);

        if (empty($value)) {
            return null;
        }

        $label = $this->translation->text('Map');

        if (!is_array($value) || count($value) != 2) {
            $this->setErrorInvalid($field, $label);
            return false;
        }

        if (count($value) != count(array_filter($value, 'is_numeric'))) {
            $this->setErrorInvalid($field, $label);
            return false;
        }

        return true;
    }
protected function validateDataMapStore()
    {
        $field = 'data.map';
        $value = $this->getSubmitted($field);

        if (empty($value)) {
            return null;
        }

        $label = $this->translation->text('Map');

        if (!is_array($value) || count($value) != 2) {
            $this->setErrorInvalid($field, $label);
            return false;
        }

        if (count($value) != count(array_filter($value, 'is_numeric'))) {
            $this->setErrorInvalid($field, $label);
            return false;
        }

        return true;
    }
protected function validateDataMapStore ( ) { $ field = 'data.map' ; $ value = $ this -> getSubmitted ( $ field ) ; if ( empty ( $ value ) ) { return null ; } $ label = $ this -> translation -> text ( 'Map' ) ; if ( ! is_array ( $ value ) || count ( $ value ) != 2 ) { $ this -> setErrorInvalid ( $ field , $ label ) ; return false ; } if ( count ( $ value ) != count ( array_filter ( $ value , 'is_numeric' ) ) ) { $ this -> setErrorInvalid ( $ field , $ label ) ; return false ; } return true ; }
Validates map coordinates
@return boolean|null
Validates map coordinates