I have an existing form. I am using field patterns to ensure proper phone numbers and e-mail addresses. I use these on both required and optional fields. I recently noticed that the field validation is failing on submit for fields that have patterns, are optional and are blank. I don't believe this used to be the case. Is this new behavior? How do I run a pattern recognition on optional fields?
That's actually strange - this was an issue for a long time, but it was fixed some time ago. Are you using public web forms or SharePoint forms? Which version?
Also, please, open browser's dev tools, go to Sources tab and send me a screenshot of widget number like this:
This is a Public Form. I use the desktop designer version 1.8.4
Below is the widget number
I have had these patterns set on this form for a while with no issue. It only started a few weeks ago where this issue came up.
Can you export your form, so we can import it? And share a link with us?
I've just tried creating a desktop form with patterns, and it doesn't seem like these fields are required - PatternDesktop
In my form, I had removed all these patterns to avoid the issue. Before I exported the form, I wanted to verify that the issue still existed since you couldn't reproduce it. I just enabled those patterns and the issue didn't appear. I can't explain why I observed this previously.
At this point, we can consider the issue closed. If I see this going forward, I will reach back out. Thanks for your help!
The issue was fixed some time ago, this might've been a leftover effect, and you just needed to re-add the fields, not quite sure on this one.
In any case, if you do notice it again, or any other issue for that matter - let us know We're to help!