Field validation rule: comma separated email addresses
This is an open discussion with 1 reply, filed under Troubleshooting.
Search
Not sure why it'd work elsewhere but not in Symphony. Perhaps it's a difference between JS and PHP regex?
Create an account or sign in to comment.
Hello people,
I have a text input field which will be used to store multiple comma separated email addresses. I'm looking to write a validation rule for it - sadly regex still baffles at times!
The default Symphony email validation rule looks like this:
/^\w(?:\.?[\w%+-]+)*@\w(?:[\w-]*\.)+?[a-z]{2,}$/i
My multiple email address validation is taking shape as such:
/^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9_\-\.]+\.[a-zA-Z ,]{2,5}$/i
The above appeared to work when I tested it in this regex sandbox however it fails validation in Symphony.
Any input would be appreciated.
JL