validate-email-address

HomeAbout
Mon 27 Apr 2026

I'm building a new web site in Scheme for BALISP, the Bay Area Lisp and Scheme Users Group. (The site isn't launched yet, but will replace the current Meetup.com redirect at balisp.org sometime before our next meeting.)

The BALISP site needs to validate users' email addresses to make sure that they comply with RFC 5322, but I couldn't find a complete validator written in Scheme. Everything I read said that making a correct validator is a surprising amount of work. Many people write a complicated regular expression that produces false positives and negatives, but that felt wrong.

Fortunately, Dominic Sayers had published a thorough set of tests as part of his isemail validator, written in PHP. With those tests and the help of Claude Code, I was able to implement a complete validator that works in Chibi Scheme and Gauche Scheme. My new Scheme library is called validate-email-address, and is licensed under the MIT license except for the test data, which are licensed under Dominic's original BSD 3-Clause license. I hope it's useful to other Scheme hackers.