Create a 4-digit security code input that allows you to enter a two-factor authorization code. It should resemble the screenshot below:
Implement a form submission handler that calls a
submitCode(code) function with the 4 digits as a concatenated string. Implement a
submitCode function that validates the code given against a hardcoded 4-digit string.
The inputs should be as usable as possible, specifically:
Note: Pasting input into the field(s) is a complicated problem, addressed in one of the additional challenges. For the main problem, assume that copying and pasting a number into the field(s) results in undefined behavior.