jkk / formative

Web forms for Clojure and ClojureScript - rendering, parsing, and validating

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatic :datatype validation

abp opened this issue · comments

commented

When specifying a :datatype on fields, validation raises error-messages, but those aren't customizable.

Could you make the messages customizable, please?

Good point. I'll think about the best way to handle that. Two possibilities: 1) a field attribute for the message; 2) having an explicit validation rule override the implicit datatype validation.

fixed in commit d23d3e6 with the :datatype-error field key.

Also added a :validate-types form key which can be used to disable datatype validation altogether in favor of explicit validations.