Validation rule doesn't recognise a hyphen as text

malfiscious

Registered User.
Local time
Today, 15:50
Joined
Feb 15, 2013
Messages
24
This is my first post so hello :)

I'm struggling with a validation rule that almost works but not quite.

I want to restrict the values in a feild by characters between 0-9, A-Z, _ and -

Using the following string works for all except the hyphen, which I assume is because it's an operator:

Is Null OR Not Like "*[!((a-z) or (0-9) or (_) or (-))]*"

Is there something I can do to make it recognise the - as text?

Thanks for any help
 
Hi, thanks for the quick reply.

At first I only entered [!a-z0-9_-] and when I saved I got the following error: Could not find feild !a-z0-9_-

Schoolboy error I guess, so I entered: Is Null Or Not Like "*[!a-z0-9_-]*"

Now it seems to work perfectly so thanks for your help! No more banging my head against the wall when someone gets trigger happy with the keyboard!
 

Users who are viewing this thread

Back
Top Bottom