How can I allow hyphen (or dash) in this validation rule?

M

mlev

In the form, users may enter alphanumerical data. The only special
characters I want to allow are periods (.) and hyphens (-).

How can I modify this validation rule to allow a hyphen? Rule is:

Is Null Or Not Like "*[!((a-z) or (0-9) or (.))]*"
 
M

Marshall Barton

mlev said:
In the form, users may enter alphanumerical data. The only special
characters I want to allow are periods (.) and hyphens (-).

How can I modify this validation rule to allow a hyphen? Rule is:

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

Try using:
Is Null Or Not Like "*[!a-z0-9.-]*"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Validation Rule 1
Validation Rule 1
validation rule - IsNotNull 4
Custom validation rule 4
Validation Rule 2
Using Validation Rule 4
Validation Text 1
Validation Rule Error Messages 1

Top