In this chapter, you learned how to accept and validate, submitted input from a user using Validateur
. You also learned how to create reusable validators, thus reducing the amount of code you'd have to write in the future. Finally, we adjusted our signup.html
template to use a new Selmer tag—the cycle tag—to loop through our errors and render each one out appropriately. However, we lived a little dangerously: we did some refactoring, but had no way of ensuring that what we refactored worked until we tested it in the browser. In the next chapter, we'll take a look at how we could have written some tests to validate this for us.

Clojure Web Development Essentials
By :

Clojure Web Development Essentials
By:
Overview of this book
Table of Contents (19 chapters)
Clojure Web Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Getting Started with Luminus
Ring and the Ring Server
Logging
URL Routing and Template Rendering
Handling Form Input
Testing in Clojure
Getting Started with the Database
Reading Data from the Database
Database Transactions
Sessions and Cookies
Environment Configuration and Deployment
Using Korma – a Clojure DSL for SQL
Index
Customer Reviews