Validate HTML Inputs w/ Pattern Attribute

Validate HTML Inputs w/ Pattern Attribute

Add a simple pattern and title attribute on any HTML input to only allow a specific value or part of a value to be accepted. This can be used to validate emails from a specific domain like “@example.com” or only accept links that include a specific string. The title attribute allows a custom message appear in a browser default tooltip if the email entered isn’t valid.

Within the pattern attribute we use regex to determine what value match is approved. You can use regex to match just about anything, so this general approach can also be used to match other specific values in any input.

Industries

Creators

Have feedback or a question related to this item? Drop us some feedback!

Curated: 
5.4.23

Similar items

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Figma Plugins

6.26.24

Oddit

6.26.24

TED Fellows

6.25.24

Scroll to accordion on open

6.25.24

Sonar Music

6.25.24

Translatable Project

6.25.24

BCG Platinion

6.24.24

All The Rage by Memberstack

6.24.24

Manuel Ogomigo

6.24.24

Studio Few

6.20.24

Mac Media

6.19.24

Toil

6.17.24

Invoke

6.17.24

molly

6.17.24

Quin

6.17.24

Unfold

6.14.24

Crymbo

6.14.24

Kabata

6.14.24

Buildspace

6.14.24

Planhat

6.14.24

Drug Test Innocence

6.11.24

Tubik

6.11.24

Plain

6.11.24

Obliques

6.11.24

First Influence

6.7.24

Some Yellow

6.7.24

Standard Equipment

6.7.24

Heva Health

6.7.24

Art Money

6.6.24

Colin & Samir

6.6.24

Canadian Seafood Treasures

6.6.24

Claudio Guglieri

6.5.24

Seen

6.4.24

Bytebot

6.3.24

Alta Trattoria

6.3.24

Ginkgo Sociotechnical Studio

6.3.24

Stewart-Schäfer

6.1.24

Make Any Framer Component With ChatGPT

6.1.24

Modular

5.30.24

Pantheone Audio

5.30.24

Decoding Bio

5.29.24

GoPidge

5.29.24

School of Motion

5.29.24

Spark Advisors

5.28.24

FlowScripts GPT - GSAP Code for Webflow

5.26.24

Mersol

5.23.24

O'shane Howard

5.22.24

Wavebird

5.22.24

Mizzi Studio

5.22.24

Shape Shyft

5.22.24

NaughtyDuk

5.22.24

Park

5.22.24
Load more

Bummer, no results

Try a different search/filter combo, or drop us some feedback if there is something missing you would love to see!

Reset filters

Subscribe for updates

Get updates on the latest curated resources and be the first to hear of new features.