Reputation: 8921
I have a phone-number pattern in place now. I'd like to allow the empty string temporarily as a valid value. What is the pattern for that? Here's the existing check:
( ([fax] like '[1-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9][0-9]'))
How would that pattern be changed to accept the empty string as well?
Upvotes: 0
Views: 164
Reputation: 222442
How would that pattern be changed to accept the empty string as well?
You could just use or
:
(
[fax] = ''
or [fax] like '[1-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9][0-9]'
)
Upvotes: 1