The regex validator in validator-regex.ts is currently altering email addresses in a way that makes them invalid.
This is due to the format on the input (validator-string.ts format), which replaces certain characters (including . and @) with spaces or removes them entirely.
Steps to Reproduce
Add a contact property of type regex for email attribute:
Description
The regex validator in
validator-regex.ts
is currently altering email addresses in a way that makes them invalid. This is due to the format on the input (validator-string.ts
format), which replaces certain characters (including.
and@
) with spaces or removes them entirely.Steps to Reproduce
Add a contact property of type
regex
for email attribute:Upload or add new item and define email attribute. Eg:
johndoe@gmail.com
The validator alters the email address to
johndoegmail com
, which is not a valid email address.Expected Behavior
The regex validator should validate the email address, trim space around and retain all original characters, including
.
and@
.Actual Behavior
The regex validator alters the email address, replacing
.
with a space and removing@
.Suggested Fix