src/Element/Password.php
public function getInputSpecification()
    {
        return [
            'name'       => $this->getName(),
            'required'   => true,
            'filters'    => [
                Filter\StringTrim::class    => [
                    'name' => Filter\StringTrim::class
                ],
                Filter\StripNewlines::class => [
                    'name' => Filter\StripNewlines::class
                ]
            ],
            'validators' => [
                PasswordValidator::class => [
                    'name'    => PasswordValidator::class,
                    'options' => [
                        // Bcrypt truncates input > 72 bytes
                        'maximumLength' => 72
                    ]
                ]
            ]
        ];
    }
public function getInputSpecification()
    {
        return [
            'name'       => $this->getName(),
            'required'   => true,
            'filters'    => [
                Filter\StringTrim::class    => [
                    'name' => Filter\StringTrim::class
                ],
                Filter\StripNewlines::class => [
                    'name' => Filter\StripNewlines::class
                ]
            ],
            'validators' => [
                PasswordValidator::class => [
                    'name'    => PasswordValidator::class,
                    'options' => [
                        // Bcrypt truncates input > 72 bytes
                        'maximumLength' => 72
                    ]
                ]
            ]
        ];
    }
Provide default input rules for this element and attaches an password validator.

@return array