One form field
CapType renders the widget and validates the token on submit, with the Cap constraint.
composer require silarhi/cap-bundleOne form field
CapType renders the widget and validates the token on submit, with the Cap constraint.
Checkbox or invisible
Cap’s widget, or nothing at all: the challenge is solved while the visitor fills the form.
SPA ready
Turbo Drive, Turbo Frames, the Turbo cache, the back-forward cache and forms you submit with fetch().
Stimulus or not
A controller StimulusBundle registers for you, or a script the form renders, with no build step.
Self-hosted end to end
Your Cap server, and the widget script and its WebAssembly solver from your domain if you like.
Any payload
The #[Cap] constraint and CapVerifierInterface protect JSON endpoints too.