-
-
Notifications
You must be signed in to change notification settings - Fork 589
Some problems validating while checking "type", "pattern" and "format" #435
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
Comments
Hi @EwanLanegan, glad you're finding this useful! In general I'd ask that you use StackOverflow, IRC, or Slack for support and reserve this issue tracker for bugs (or suspected bugs). It's also extremely helpful regardless to minimize your error into a SSCCE, and there are a large number of things here that I suspect you can remove while still getting your error (at which point it may even be obvious what the issue is). Because this is already here and there are a few obvious things:
|
@Julian Thanks for pointing these issues out to me! One question: Does the TypeChecker method need to be a parameter within the validate method, or is it a separate thing? |
|
96742ba3 Merge pull request #438 from Zac-HD/overflow-with-multipleOf c5ba4ba3 Check for multipleOf overflow c12b0db8 Merge pull request #437 from gregsdennis/if-then-else-sequencing bd148eb7 copy/paste error 3ca7c419 Added if/then/else sequencing tests; resolves #436 fa73bc8d Merge pull request #435 from jviotti/unevaluated-items-typo 2d6de7cb Fix "unevaluted" typos in "unevaluatedItems" suite 2a9be81d Merge pull request #1 from json-schema-org/master git-subtree-dir: json git-subtree-split: 96742ba3c4a1eff6de45f0c50a66a975796b7c37
Hey @Julian ! Loving the module so far. Having some problems whilst trying to validate a large JSON (the code below is an example, not the real thing). I am trying to validate JSON data against the following schema:
The problem is that the validation method is allowing any type of data to be input, and so is outputting false trues. I have read the docs but I cannot find a clear way to validate the types, patterns (especially) and formats. I think the main parts I may need advice on is FormatChecker() and TypeChecker(), but to be honest I am not sure where the problem is.
The output for this is
User data is valid.
The output I need is
User data is invalid! (type of error, where etc.)
I am new to this, so I have probably made a few really silly mistakes. However, if you could give a clear explanation of how to check if each type is the correct type, pattern and format, that would be great! I will test whatever you suggest immediately and get back to you.
Thanks :)
The text was updated successfully, but these errors were encountered: