nowo-tech / otp-input-bundle
Symfony OTP FormType with multi-input UI mapped to a single field value.
Package info
github.com/nowo-tech/OTPInputBundle
Language:Shell
Type:symfony-bundle
pkg:composer/nowo-tech/otp-input-bundle
Fund package maintenance!
v1.9.0
2026-11-16 04:13 UTC
Requires
- php: >=8.2 <8.6
- symfony/asset: ^6.4 || ^7.0 || ^8.0
- symfony/config: ^6.4 || ^7.0 || ^8.0
- symfony/dependency-injection: ^6.4 || ^7.0 || ^8.0
- symfony/form: ^6.4 || ^7.0 || ^8.0
- symfony/framework-bundle: ^6.4 || ^7.0 || ^8.0
- symfony/http-kernel: ^6.4 || ^7.0 || ^8.0
- symfony/twig-bundle: ^6.4 || ^7.0 || ^8.0
- twig/extra-bundle: ^3.12
- twig/string-extra: ^3.12
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- igor-php/igor-php: ^0.10.0
- nowo-tech/phpstan-frankenphp: ^1.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.0
- rector/rector: ^2.0
- symfony/browser-kit: ^6.4 || ^7.0 || ^8.0
- symfony/css-selector: ^6.4 || ^7.0 || ^8.0
- symfony/dom-crawler: ^6.4 || ^7.0 || ^8.0
- symfony/translation: ^6.4 || ^7.0 || ^8.0
- symfony/yaml: ^6.4 || ^7.0 || ^8.0
- vincentlanglet/twig-cs-fixer: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- v1.9.0
- v1.8.3
- v1.8.2
- v1.8.1
- v1.8.0
- v1.7.0
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.2
- v1.0.1
- v1.0.0
- dev-chore/req-sweep-2026-11-16
- dev-feat/no-js-fallback
- dev-ci/coverage-gate-100
- dev-chore/demo-uikit-formkit
- dev-test/worker-kept-alive
- dev-ci/igor-worker-audit
- dev-chore/symfony-security-2026-11-04
This package is auto-updated.
Last update: 2026-11-16 08:24:51 UTC
README
Star Found this useful? Install it from Packagist and support the project on GitHub.
Customizable Symfony OTP FormType with multiple visible inputs that map to a single field value.
This bundle is FrankenPHP worker mode friendly.
Table of contents
Features
OtpType::classfor verification codes (2FA, email confirmation, magic code).- Multi-input UI rendered in Twig form themes.
- Stores data as one string value in your DTO/entity.
- Customizable length, classes, numeric/alphanumeric mode, and uppercase normalization.
- TypeScript + Vite assets in
src/Resources/assets(named packagenowo_otp_input). - Paste / SMS autofill (
autocomplete="one-time-code"on the first box); translations de, en, es, fr, it, nl, pt. - Multi-framework Twig themes (Bootstrap, Tailwind, Foundation, Symfony default).
- FrankenPHP worker mode verified with
FRANKENPHP_RESET_KERNEL=false(sticky Kernel); see the worker audit.
Quick usage
use Nowo\OtpInputBundle\Form\OtpType; $builder->add('otpCode', OtpType::class, [ 'length' => 6, 'numeric_only' => true, 'container_class' => 'd-flex gap-2', 'input_class' => 'form-control text-center', 'gap_class' => 'otp-grid', ]);
The value received in otpCode is a single string like 123456.
Demo preview
Empty OTP digit cells |
Code entered across digit cells |
Documentation
- Installation
- Configuration
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
- GitHub Actions CI requirements
- PSR evaluation (REQ-CS-007)
- FrankenPHP worker audit (
reset_kernel: false) - Demo notes
Tests and coverage
- PHP: 100%
- TS/JS: 97.33% (Vitest; lowest of statements/branches/functions/lines — lines 100%, branches 97.33%; CI gate 90%)
- Python: N/A


