kbss-cvut / s-forms

SForms - Semantic form generator and processor. For ontology-based smart forms.
GNU Lesser General Public License v3.0
4 stars 7 forks source link

Added form validation to storybook toolbar #317

Closed LaChope closed 6 months ago

LaChope commented 6 months ago

Resolves #311.

netlify[bot] commented 6 months ago

Deploy Preview for s-forms-kbss ready!

Name Link
Latest commit b402811c03365a9d39c80dcaddfd3f77af697b7e
Latest deploy log https://app.netlify.com/sites/s-forms-kbss/deploys/66168055fbce1100085a2396
Deploy Preview https://deploy-preview-317--s-forms-kbss.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

LaChope commented 6 months ago

Did you use some form that has validation? :) If yes, maybe try to wait a little bit, it sometimes takes a bit of time (5s). I sometimes also had to refresh the page and do it again.

blcham commented 6 months ago

image

blcham commented 6 months ago

Ok so now it works only after I write something to a field. So it should be written to help of the button "Validate form" ...

LaChope commented 6 months ago

It should not behave like that... It should work the exact same way as in record-manager like the "save" and "complete" buttons

blcham commented 6 months ago

So if u navigate to form2 you can immediately see validation errors of all fields?

I see validation of all fields but only when i write something to a field.

LaChope commented 6 months ago

There is a strange behavior. If I click once, only one part of the form is validated, if I clicked twice, the whole form is validated (see screenshots below):

image

image

LaChope commented 6 months ago

This behavior happens only in form2, for instance, it works as expected in aircraft form.

blcham commented 6 months ago

Ok give it a couple of minutes to resolve it, if you do not come up with a solution do the merge, i guess it is not that big issue

LaChope commented 6 months ago

b402811 does not fix the issue, but I realized working on this issue that all questions were not traversed by the validator.

I do not know why yet, but "Validate form" must be clicked twice to actually validate. It seems to be linked to storybook rather than validator itself. I reported it in #321.