A Stimulus controller to auto-submit authentication codes
I think this is neat - very succinct. This controller expects an input that calls formatOnSubmit on input, which removes invalid chracters, strips the input (e.g. of spaces), and then automatically submits it. Works great with pasting, manually typing, and provides fast feedback to users. import { Controller } from "@hotwired/stimulus"; export default class extends Controller { static targets =...