Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zen/string :length is defined for zen/schema but has no interpreter implemented #41

Open
KGOH opened this issue Nov 8, 2022 · 0 comments

Comments

@KGOH
Copy link
Contributor

KGOH commented Nov 8, 2022

zen/length is defined here:

zen/pkg/zen.edn

Lines 163 to 166 in 6529623

length
{:zen/tags #{schema is-key}
:for #{string}
:zen/desc "lenght of string"}

but defmethod zen.v2-validation/compile-key :length is missing

Execute this to reproduce:

  (def ztx (zen.core/new-context))
  (zen.core/load-ns ztx '{ns myns mystr {:zen/tags #{zen/schema}, :type zen/string, :length 10}})
  (zen.core/errors ztx)
  (zen.core/validate ztx #{'myns/mystr} "hello")
  ;; => {:errors [], :warnings [], :effects []}

Urgency: low
Just noticed this issue, don't use :length myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant