formio icon indicating copy to clipboard operation
formio copied to clipboard

[BUG] Signature panel accepts empty input even though marked as Required

Open VinceBab opened this issue 3 years ago • 1 comments

Environment

Please provide as many details as you can:

  • Hosting type
    • [x] Form.io
    • [ ] Local deployment
      • Version:
  • Formio.js version: Current version on portal.form.io as of January 18th, 2022
  • Browser: Chrome (97.0.4692.71), Edge (97.0.1072.62)

Steps to Reproduce

  1. Sign up for trial
  2. Create new API Web form
  3. Add signature panel to it
  4. On the Validation panel, check the "Required" property
  5. Test the form by clicking "Use"
  6. Note that the "Submit" button starts off disabled but becomes enabled as soon as you click into the signature panel, even though you have not entered anything.

Expected behavior

Need to enter something into the panel before I can submit.

Observed behavior

Able to submit with no data in the panel.

VinceBab avatar Jan 18 '22 16:01 VinceBab

There is no focus behavior on the signature pad. Clicking the pad places a dot, but because you don't move the mouse, nothing gets drawn.

The submit button is triggered by the data present on the pad, so disabled when null, enabled when not null. an empty image is not the same as a null image.

multinerd avatar Feb 22 '22 22:02 multinerd

Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!

daneformio avatar Jan 31 '24 14:01 daneformio