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

ZSchema required? #26

Open
mjau-mjau opened this issue Oct 31, 2015 · 4 comments
Open

ZSchema required? #26

mjau-mjau opened this issue Oct 31, 2015 · 4 comments

Comments

@mjau-mjau
Copy link

I understand ZSchema-browser supposedly does some json-validation. However, I have disabled this JS file and I can't see any difference. The jsonform still validates successfully on submit. Is it an optional module? I am curious because it does after all weigh in at 80kb+.

@ulion
Copy link
Owner

ulion commented Oct 31, 2015

then you may just skipped the json schema validation.

2015-10-31 13:31 GMT+08:00 Karl Ward notifications@github.com:

I understand ZSchema-browser supposedly does some json-validation.
However, I have disabled this JS file and I can't see any difference. The
jsonform still validates successfully on submit. Is it an optional module?
I am curious because it does after all weigh in at 80kb+.


Reply to this email directly or view it on GitHub
#26.

Ulion

@ulion
Copy link
Owner

ulion commented Oct 31, 2015

you can use browser's develop console setup break point
in formTree.prototype.validate function, then see how does it go when doing
the validation.

2015-10-31 20:09 GMT+08:00 Ulion ulion2002@gmail.com:

then you may just skipped the json schema validation.

2015-10-31 13:31 GMT+08:00 Karl Ward notifications@github.com:

I understand ZSchema-browser supposedly does some json-validation.
However, I have disabled this JS file and I can't see any difference. The
jsonform still validates successfully on submit. Is it an optional module?
I am curious because it does after all weigh in at 80kb+.


Reply to this email directly or view it on GitHub
#26.

Ulion

Ulion

@mjau-mjau
Copy link
Author

Excuse my ignorance, but doesn't jsonform generally validate with the following? ... or is there some zschema-specific implementation?

form_object.onSubmit = function (errors, values) {
  if(errors) {
    console.log('Errors');
    console.dir(errors);
  } else {
    console.log('Success');
    console.dir(values);
  }
}

Thanks for your efforts with jsonform btw.

@ulion
Copy link
Owner

ulion commented Nov 1, 2015

no, jsonform does not do the validation work, but it will try to find
loaded json schema validator to do that.

2015-11-01 13:36 GMT+08:00 Karl Ward notifications@github.com:

Excuse my ignorance, but doesn't jsonform generally validate with the
following? ... or is there some zschema-specific implementation?
form_object.onSubmit = function (errors, values) {
if(errors) {
console.log('Errors');
console.dir(errors);
} else {
console.log('Success');
console.dir(values);
}
}

Thanks for your efforts with jsonform btw.


Reply to this email directly or view it on GitHub
#26 (comment).

Ulion

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

2 participants