Skip to content

confirmation

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

Usage

(defvalidator user-validator
  [:email :confirmation])

(user-validator {:email "[email protected]"})
; {:email ["doesn't match confirmation"]}

(user-validator {:email "[email protected]" :email-confirmation "[email protected]"})
; {}

(defvalidator user-validator
  [:email :confirmation {:confirm :some-other}])

(user-validator {:email "[email protected]" :email-confirmation "[email protected]"})
; {:email ["doesn't match confirmation"]}

(user-validator {:email "[email protected]" :some-other "[email protected]"})
; {}

Options:

  • :confirm The key to compare against. Default (key-name)-conifrmation.

Default error message:

"doesn't match confirmation"

Clone this wiki locally