Skip to content

Commit da4b604

Browse files
Merge pull request #1785 from OpenSignLabs/updates-15425322075
handle crashing pattern for text input widgets
2 parents dcbde2b + 82d518b commit da4b604

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

apps/OpenSign/src/components/pdf/WidgetsValueModal.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,8 +1684,12 @@ function WidgetsValueModal(props) {
16841684
validateExpression(regexValidation);
16851685
break;
16861686
default:
1687-
regexValidation =
1688-
currWidgetsDetails?.options?.validation?.pattern || "";
1687+
// Grab the current pattern (if it exists)
1688+
const pattern = currWidgetsDetails?.options?.validation?.pattern;
1689+
// Removed `backwordSupportPattern` (/^[a-zA-Z0-9s]+$/) — it blocked spaces and special characters.
1690+
const backwordSupportPattern =
1691+
pattern && pattern === "/^[a-zA-Z0-9s]+$/" ? "" : pattern; // If it matches exactly '/^[a-zA-Z0-9s]+$/', clear it
1692+
regexValidation = backwordSupportPattern || "";
16891693
validateExpression(regexValidation);
16901694
break;
16911695
}

apps/OpenSign/src/pages/PdfRequestFiles.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,10 @@ function PdfRequestFiles(
865865
const user = usermail?.Email
866866
? usermail
867867
: pdfDetails?.[0]?.Signers[newIndex];
868-
if (sendmail !== "false" && sendInOrder) {
868+
if (
869+
sendmail !== "false" &&
870+
sendInOrder
871+
) {
869872
const requestBody =
870873
updatedDoc.updatedPdfDetails?.[0]?.RequestBody;
871874
const requestSubject =

0 commit comments

Comments
 (0)