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

Join us online at Webflow Conf 2025

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

Multiple Nested Collections w/ Jquery .load()

10.6.21

Ben Fryc

10.5.21

Mrs&Mr

10.4.21

Welcome

10.1.21

Maptober

9.30.21

METRIK

9.30.21

Monograph

9.27.21

Humain

9.24.21

Almanac

9.21.21

Real Meals

9.21.21

CSS Halftone Overlay Effect

9.20.21

Vimeo Video as Background

9.20.21

Givebutter

9.8.21

CommandDot

9.7.21

Finsweet Normalize CSS Embed

9.2.21

Eva Habermann

8.30.21

Setting Cookies

8.25.21

Set Hidden Input Value From URL Parameters

8.25.21

Caltech Alumni Association

8.24.21

breef.

8.23.21

Milieu Grotesque Type Foundry

8.20.21

Makeshift Brooklyn

8.18.21

Maven

8.17.21

Hide/show Based on URL Parameter

8.16.21

Optimage

$15
8.4.21

Stir

8.2.21

Prefers Reduced Motion Media Query

7.28.21

Asset Supply©

7.19.21

Lightyear

7.14.21

Black Foundry

7.13.21

Localyze

7.7.21

UNDESIGNED STUDIO

6.30.21

Daniel See

6.29.21

Beseda

6.25.21

Ergonomics 101

6.10.21

Twigs Paper

6.10.21

Appart Agency

6.10.21

Welcome to Calvary

6.10.21

Moodboard Cloneable

6.10.21

SkillHub

6.9.21

Pry

6.7.21

Joshua Kaplan

6.3.21

First Session

6.3.21

Custom Media Player Integration with Plyr.io

6.2.21

Marker.io

6.2.21

Galactic Energy

6.2.21

RevenueCat

5.28.21

Wayflyer

5.28.21

ShapeShift

5.26.21

Corebook°

5.25.21

Alex Fisher Design

5.24.21
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.