📜 ⬆️ ⬇️

Regular expressions for validating common data types

For checking text fields for validity, regular expressions are usually used. There are several of the most common types of data, such as a credit card number, a date in a specific format, etc. The html5pattern.com website collects a collection of regular expressions for such data (there it is positioned as possible content of the html5 pattern attribute of inpit elements , but these regular expressions can be used for familiar validation with javascript). Examples relevant to the Russian audience, along with the corresponding regular expressions, you can look under the cut.


Unspecified, but important in your opinion data types, you can lay out in the comments (along with regular expressions). You can also share them with html5pattern.com by filling out the form on the main page.

')

Source: https://habr.com/ru/post/123845/


All Articles