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.

ARRAY

12.4.24

Crescent Cares

12.3.24

Advent of Prompt

12.3.24

Socket.IO

12.3.24

Custom Slider with GSAP

12.3.24

Scrapps

12.3.24

Brand Process Playbook

12.3.24

Things, Inc.

12.3.24

Tunify

12.1.24

In Tandem Families

12.1.24

Jacob's Cove Resort

12.1.24

Upscayl

12.1.24

Nico Menezes

12.1.24

Elizabeth Goodspeed

12.1.24

330

12.1.24

Pulse

12.1.24

I Can’t Believe They Added AI To The Browser

12.1.24

Logotype

12.1.24

Webflow Custom Props Enhancer

11.26.24

Gumloop

11.26.24

Spellbook

11.24.24

Isocons

11.24.24

Opal

11.22.24

Marimain

11.22.24

Golden Goose

11.22.24

eBay Playbook

11.21.24

Gentlerain

11.21.24

Hello Patient

11.21.24

Design Gal Studio

11.21.24

Bike in Portugal

11.19.24

Updating Our Web System For A New Era

11.19.24

OpusClip

11.19.24

Ramona Bizbac

11.19.24

Teletech

11.18.24

Circuit

11.16.24

Griffo House

11.15.24

How to Grow & Scale Your Business With Webflow

$50
11.15.24

Startups Gallery

11.15.24

Flow Growth by MakeBuild

11.12.24

Jamey Gannon

11.12.24

How to think for yourself

11.12.24

Owner

11.12.24

Lamatic.ai

11.12.24

Shaga Odyssey

11.12.24

Flighty

11.12.24

11x AI

11.12.24

Travel Next Level

11.12.24

Lapz

11.7.24

Unblocked AI Figma Plugin

11.7.24

Onx UI

11.7.24

Webflow With Cloudflare Proxy On (My New Kickass Method!)

10.30.24

1-800-D2C

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