src/FormElements/MultiCheckbox.php
public function getInputSpecification()
    {
        $haystack = \array_keys($this->getValueOptions());

        return [
            'name' => $this->getName(),
            'required' => $this->isRequired(),
            'filters' => [
                [
                    'name' => Callback::class,
                    'options' => [
                        'callback' => function ($value) {
                            if (!\is_array($value)) {
                                return [];
                            }

                            return $value;
                        },
                    ],
                ],
            ],
            'validators' => [
                [
                    'name' => Explode::class,
                    'options' => [
                        'valueDelimiter' => null,
                        'validator' => [
                            'name' => InArray::class,
                            'options' => ['haystack' => $haystack],
                        ],
                    ],
                ],

            ],
        ];
    }
public function getInputSpecification()
    {
        $haystack = \array_keys($this->getValueOptions());

        return [
            'name' => $this->getName(),
            'required' => $this->isRequired(),
            'filters' => [
                [
                    'name' => Callback::class,
                    'options' => [
                        'callback' => function ($value) {
                            if (!\is_array($value)) {
                                return [];
                            }

                            return $value;
                        },
                    ],
                ],
            ],
            'validators' => [
                [
                    'name' => Explode::class,
                    'options' => [
                        'valueDelimiter' => null,
                        'validator' => [
                            'name' => InArray::class,
                            'options' => ['haystack' => $haystack],
                        ],
                    ],
                ],

            ],
        ];
    }
Should return an array specification compatible with
{@link Zend\InputFilter\Factory::createInput()}.

@return array