data-sift

2013-01-28

DATA-SIFT is a Common Lisp data validation and transformation library. Inspired by cl-data-format-validation and WTForms validators.

Usage

CL-USER> (data-sift:sift '(integer :min-value 0 :max-value 20) "15")
15
CL-USER (funcall (data-sift:compile-rule '(number :min-value 0)) "123.456")
123.456

Built-in validators

  • string (&key strip (min-length 0) max-length message)
  • integer (&key min-value max-value message)
  • number (&key min-value max-value message)
  • regexp (&key regex message case-insensitive-mode multi-line-mode single-line-mode extended-mode)
  • email (&key message)
  • ip-address (&key message)