~/talk

Validating forms with the HTML5 pattern attribute

slides:none on file

HTML5 lets HTML carry regex validation via the pattern attribute so forms can enforce formats without heavy JavaScript; examples include \d and [0-9] to force numeric entry and bring up iOS numeric keyboards, a four‑digit Australian postcode pattern, a two‑or‑four‑digit year, a grouped regex for 24‑hour time, and an RFC‑compliant email regex that balloons to ~6.2k characters. Browser support is inconsistent (required fails in Safari 7, date controls unreliable), so a small custom JS fallback library is often used.

AI-written summary · about

  1. 0:00Intro
  2. 0:12HTML5 RECAP
  3. 3:06PATTERNS
  4. 3:39NOW YOU HAVE TWO PROBLEMS
  5. 4:53POSTCODE
  6. 5:34TIME
  7. 6:56EMAIL
  8. 8:26SECURITY
  9. 11:03CREDIT CARDS
  10. 11:50ERROR MESSAGES
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.