docusealco / docuseal

Open source DocuSign alternative. Create, fill, and sign digital documents ✍️
https://www.docuseal.co
GNU Affero General Public License v3.0
5.61k stars 372 forks source link

`validation_pattern` ignored when toggling Multiline Text #199

Closed ko-pp closed 5 months ago

ko-pp commented 5 months ago

Hello

For legal reason, we need every party signing our documents to type a set phrase above their signature. To make sure that they write what’s needed, I am using submitters.fields.validation_pattern for this field and that works* except when the user clicks the "Toggle Multiline Text" button.

It seems to me that validation should be done in JS rather than HTML, at least for the textarea since there is no pattern attribute or anything similar.

*only for the first submitter https://github.com/docusealco/docuseal/issues/200

omohokcoj commented 5 months ago

@ko-pp good catch regarding the textarea and validation pattern - we deployed a fix on prod so now textarea option is disabled when validation pattern is present (making it impossible to skip the validation via textarea). Please let me know if it solves the issue.

ko-pp commented 5 months ago

Great, I can confirm that my issue is solved. Thank you