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

  • Thread starter Thread starter mlev
  • Start date Start date
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 (.))]*"
 
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.-]*"
 
Back
Top