theleoborges / bouncer

A validation DSL for Clojure & Clojurescript applications
364 stars 38 forks source link

namespace-qualify meta keys #37

Closed vvvvalvalval closed 8 years ago

vvvvalvalval commented 9 years ago

For the next major release, I suggest to change the :validator, :default-message-format and :optional meta keys to their namespace-qualified counterparts :bouncer.validators/validator, :bouncer.validators/default-message-format and :bouncer.validators/optional.

Given that any library can add stuff to metas, this seems safer.

theleoborges commented 9 years ago

Sorry it took me so long to reply.

This seems like a reasonable things to do. If you're willing to submit a PR, I'm happy to review it.

Ideally the way defvalidator is used shouldn't change so users can still simply specify :optional and the macro will appropriately namespace it for you. Thoughts?

vvvvalvalval commented 9 years ago

Seems OK for compatibility, but I would still remove it on the next major release, better to keep things as simple and not confusing as possible IMHO :).

theleoborges commented 8 years ago

Not opposed to this change at all but don't have the time to make the change at the moment. A PR is welcome. Closing this for now.