O'Reilly logo

Clojure Web Development Essentials by Ryan Baldwin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Validating the form POST

We might write perfect code but, unfortunately, our users are mere mortals and thus are prone to giving us cruddy data by mistake. If you recall, in Chapter 1, Getting Started with Luminus, we used the Luminus template to generate the hipstr application, which includes the lib-noir library for us. One of the helper namespaces provided by lib-noir is a noir.validation namespace.

The noir.validation namespace

The noir.validation namespace provides methods to validate data in a variety of ways. It includes functions to check whether or not an input is nil, is an e-mail, is of a certain minimum length, and so on. This is excellent because I hate writing validation code, and I'm sure you do, too.

However, while noir.validation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required