src/FormElements/Text.php
public function getInputSpecification()
    {
        return [
            'name' => $this->getName(),
            'required' => $this->isRequired(),
            'filters' => [
                ['name' => StringTrim::class],
            ],
            'validators' => [
                [
                    'name' => StringLength::class,
                    'options' => ['max' => $this->getMaxLength(), 'min' => $this->getMinLength()],
                ],
            ],
        ];
    }
public function getInputSpecification()
    {
        return [
            'name' => $this->getName(),
            'required' => $this->isRequired(),
            'filters' => [
                ['name' => StringTrim::class],
            ],
            'validators' => [
                [
                    'name' => StringLength::class,
                    'options' => ['max' => $this->getMaxLength(), 'min' => $this->getMinLength()],
                ],
            ],
        ];
    }
Should return an array specification compatible with
{@link Zend\InputFilter\Factory::createInput()}.

@return array