The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Validate Javascript Form Input as CSS?

  • # August 11, 2008 at 11:44 am

    Hi all,

    I’m trying to design a cool Greasemonkey script and to have the user do some custom styling via an HTML input.

    However, I want to validate their input as a valid CSS color attribute. Is there a way to do this without writing a function to parse it exactly? Or perhaps a clever regular expression (not my forte)?

    Thanks to anyone who can help!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed