pattern attribute is mainly used to verify whether the content you input is consistent with the content of your abbreviated regular expression. If they are inconsistent, the browser's built-in form plug-in will give appropriate prompts.
The
input tag can use maxlength to limit the maximum number of digits. The minimum number of digits has no attribute to control it.
{m,n} This should be fine
The
Thepattern
attribute is mainly used to verify whether the content you input is consistent with the content of your abbreviated regular expression. If they are inconsistent, the browser's built-in form plug-in will give appropriate prompts.input
tag can usemaxlength
to limit the maximum number of digits. The minimum number of digits has no attribute to control it.