-
-
Save nocodesupplyco/997df11dcb8d825942cd3d60ac1c02a3 to your computer and use it in GitHub Desktop.
Validate HTML Inputs w/ Pattern Attribute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Example: validate for specific URL (one that ends in .webflow.io) --> | |
<input type="url" id="site" name="site" pattern="(https://)+[a-zA-z0-9-/:]+(.webflow.io)+/?" title="Enter a webflow.io URL"> | |
<!-- Example: validate for specific email (one that ends in @example.com) --> | |
<input type="email" id="email" name="email" pattern="^[A-Za-z0-9._%+-]+@example\.com$" title="Enter a valid email address"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment