addElement( 'password', 'password', ['label' => 'Password', 'required' => true, 'attribs' => ['autocomplete' => 'off']] ); $this->getElement('password')->addValidator('ConfirmPassword', false, ['confirmPassword']); $this->addElement( 'password', 'confirmPassword', ['label' => 'Confirm Password', 'required' => true, 'attribs' => ['autocomplete' => 'off']] ); $this->addElement('hidden', 'code'); return $this; } }