Validation rule for email address

dragct

Registered User.
Local time
Today, 05:50
Joined
Nov 21, 2011
Messages
20
Good Morning!

I am trying to put a validation rule into my table for an email address, to dictate that the last part of the email MUST be @my.lonestar.edu

I have reviewed this forum, as well as others and have tried various ways.

Is null or (Like "*?@my.lonestar.edu*")
Is null or ((Like "*?@my.lonestar.edu*") And (Not Like "*[ ,;]*"))
Is Null OR ((Like "*?@?*.?*.?*") AND (Not Like "*[ ,;]*"))

The problem is that when I either try to test the rule on exisiting data or import new data, I receive an error that my data does not match the rule. I have verified that my email addresses are all @my.lonestar.edu

Any advice or input would be appreciated.

Kim
 
Try it without the ?

No: Is null or (Like "*?@my.lonestar.edu*")
Yes: Is null or (Like "*@my.lonestar.edu*")
 
Still ended up with an error "Existing data violates the new setting for the "Validation Rule" property for the field, but if I say accept anyways, it posts the majority of the records...still working on it.

Any other ideas?
 
Last edited:
Howzit

I tried

Code:
Is Null Or Like "*@my.lonestar.edu"

as the validation rule against a table, and saved the table with existing data - that did not meet this criteria. I received a similar message as you got as it asks you to validate the existing data first.

Are you sure your exisitng data is either Null (note not an empty string) or ends in @my.lonestar.edu ?
 
Try it without the ?

No: Is null or (Like "*?@my.lonestar.edu*")
Yes: Is null or (Like "*@my.lonestar.edu*")

I have an observation that I believe needs to be made, even though it may not be related to your problem.

I am not sure what the trailing "*" in your string is there for, since you said "the last part of the email MUST be @my.lonestar.edu". Adding the trailing "*" would also allow addresses that included "@my.lonestar.eduxxx" or @my.lonestar.educator", and I do not think that is what you meant.
 
Thanks everyone! Got it working. I appreciate the help.
 

Users who are viewing this thread

Back
Top Bottom