Skip to content

acceptance

Myles Megyesi edited this page Oct 6, 2012 · 2 revisions

Usage

(defvalidator usage-validator
  [:terms-of-service :acceptance])

(usage-validator {:terms-of-service "1"})
; {}

(defvalidator usage-validator
  [:terms-of-service :acceptance {:accept "yes"}])

(usage-validator {:terms-of-service "1"})
; {:terms-of-service ["must be accepted"]}

(usage-validator {:terms-of-service "yes"})
; {}

Options:

  • :accept The value to compare against. Default "1".

Default error message:

"must be accepted"

Clone this wiki locally