Skip to Main Content

Visual Builder

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

VBCS oj-input-text Validator for Email do not accepts apostrophe (')

Shraddha ModiMay 31 2024 — edited May 31 2024

Problem Statement : We have few users whose email ID contains apostrophe (') and when they add their email ID in VBCS fields, email ID regex is not accepting apostrophe (').

I tried multiple regex options available onvarious forums but in below code is not accepting.

Code : Below is the existing regex code provided in VBCS email component.

<oj-input-text virtual-keyboard="email"

validators='[{"type":"regexp", "options":{"pattern":"([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})", "hint":"Enter email address.", "messageDetail": "Value must be of the form xxx@xxx.xx"}}]'

label-hint="" class="oj-flex-item oj-sm-flex-initial" id="email" label-edge="provided" value="{{ $variables.emailAddress}}">

</oj-input-text>

Expectaion : Can you please suggest on how to update the regex so that it can accept apostrophe (').

Note that apostrophe (`) can easiliy added in regex and it works as well but the required apostrophe (') which is not working in above regex.

Few example of email with apostrophe (') :

conan.d'elia@example.com

conan.o'brien@example.com

Comments
Post Details
Added on May 31 2024
0 comments
531 views