Fork me on GitHub
#reagent
<
2018-10-29
>
JH19:10:42

Hello there, would anyone know how I would achieve this.checkValidity() with reagent? I am trying to trigger a validation check during an on-blur event.

lilactown19:10:24

(defn check-validity [info]
  ;; check if info is valid
  )

(defn form []
  ;; get info from somewhere
  [:input {:on-blur (partial check-validity info)}])

henrik06:10:21

Shouldn’t check-validity also take the event, or is it OK in JS-land to ignore it?

pcj14:10:13

You won't get an arity exception. I still prefer to just include the _ though

👍 4
lilactown19:10:44

@jacob.haag☝️is this what you want? it's unclear from your question what behavior you want