rivan
Diamond Member
I'm a total code hack - I'll admit up front.
I've got a bit of regex to validate a form field as a valid email address (within our company) but I'd like it to validate OK if left blank as well.
Take this generic email validation:
([\w-\.]+)@((?:[\w]+\.)+)([a-zA-Z]{3})
How would I modify that to include an "or (null)"?
I've got a bit of regex to validate a form field as a valid email address (within our company) but I'd like it to validate OK if left blank as well.
Take this generic email validation:
([\w-\.]+)@((?:[\w]+\.)+)([a-zA-Z]{3})
How would I modify that to include an "or (null)"?