Permitted values are: go, done, next, search, and send. Once data is entered into the box, the placeholder disappears; if the box is emptied, the placeholder reappears. If no minlength is specified, or an invalid value is specified, the telephone number input has no minimum length. © 2005–2020 Mozilla and individual contributors.Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later. These are pattern and required. : The element of type ?tel? For example, let's use this HTML: And let's include the following CSS to highlight valid entries with a checkmark and invalid entries with a cross: If you want to further restrict entered numbers so they also have to conform to a specific pattern, you can use the pattern attribute, which takes as its value a regular expression that entered values have to match. Each input has a placeholder attribute to show a hint to sighted users about what to enter into it, a pattern to enforce a specific number of characters for the desired section, and an aria-label attribute to contain a hint to be read out to screenreader users about what to enter into it. Despite the fact that inputs of type tel are functionally identical to standard text inputs, they do serve useful purposes; the most quickly apparent of these is that mobile browsers — especially on mobile phones — may opt to present a custom keypad optimized for entering phone numbers. A boolean value instructing the browser to set the focus to this control when the document has finished loading or when the dialog where the control finds itself is shown. Example: However, 865-555-6502 will be accepted. A simple tel input In its most basic form, a tel input can be implemented like this: Если присутствует атрибут pattern, то форма не будет отправляться, пока поле не будет заполнено правильно. For number a simple numeric keypad is shown, but for tel the user is presented with a virtual telephone keypad, complete with alphanumeric keys. An integer indicating the maximum number of characters the value of this control may have. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel, Overriding BiDi using Unicode control characters, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel, The id of the