If you have to do it in Remedy, then it depends on what server
version and how accurate you want to get.
Remedy has some bugs in their Run If LIKE command with brackets, but
here's what should work.
Run If:
'ip' LIKE "%.%.%.%" AND
('ip' LIKE "[0-2][0-9][0-9].%" OR 'ip' LIKE "[0-9][0-9].%"
OR 'ip' LIKE "[0-9].%") AND
('ip' LIKE "%.[0-2][0-9][0-9].%.%" OR 'ip' LIKE "%.[0-9][0-9].%.%"
OR 'ip' LIKE "%.[0-9].%.%") AND
('ip' LIKE "%.%.[0-2][0-9][0-9].%" OR 'ip' LIKE "%.%.[0-9][0-9].%"
OR 'ip' LIKE "%.%.[0-9].%") AND
('ip' LIKE "%.[0-2][0-9][0-9]" OR 'ip' LIKE "%.[0-9][0-9]"
OR 'ip' LIKE "%.[0-9]")
This forces the field to have 4 fields separated by periods with
1-3 digits each. When 3 digits the first can only be 0, 1 or 2.
Note: This doesn't block numbers greater than 255, but that can
be easily added.
AND NOT ( 'ip' LIKE "26_.%" OR 'ip' LIKE "25[6-9].%")
AND NOT ( 'ip' LIKE "%.26_.%.%" OR 'ip' LIKE "%.25[6-9].%.%")
AND NOT ( 'ip' LIKE "%.%.26_.%" OR 'ip' LIKE "%.%.25[6-9].%")
AND NOT ( 'ip' LIKE "%.26_" OR 'ip' LIKE "%[6-9]")
You'll have to test this with your version, the Remedy bug that
I've encountered will treat the bracketed characters as an
underscore, when preceeded with %.
-----Original Message-----
From: Meraz Aguilera Mauricio [mailto:mmeraz@SCANDA.COM.MX]
Sent: Tuesday, December 28, 1999 7:52 PM
To: ARSLIST@LISTSERV.VISTAIT.COM
Subject: Validation: Masking IP address or Phone Number into CHAR
Hello
Again, I think this one has been answered before.
I need to validate a character field. I need to enter a value for an IP
address that matches the appropiate mask: nnn.nnn.nnn.nnn
If a user enters a non-valid value for an IP he must get an error message.
Please give advice.....
--------------------------------------------
Mauricio Meraz Aguilera
Omniscope (Grupo Scanda)
Tel: 54222700 x6040
e-mail: mmeraz@scanda.com.mx
skytel: 52277979 pin: 6251336
--------------------------------------------
To Unsubscribe send e-mail to:
body of text is: unsubscribe arslist