<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:358313285;
mso-list-type:hybrid;
mso-list-template-ids:-438906358 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi Everyone,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Once I was told where Custom Field Validation is maintained
in RT 3.6.0, I thought I make this small contribution to RT 3.6.0. The
following code snippet contains several useful regexp validations. Two of these
are provided with RT 3.6.0 (Mandatory, Digits), the new additions are as
follows:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<ol style='margin-top:0in' start=1 type=1>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>DateYYYYMMDD – Date in
YYYY-MM-DD or YYYY/MM/DD format<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>DateMMDDYYYY – Date in
MM-DD-YYYY or MM/DD/YYYY format<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>DateDDMMYYYY – Date in
DD-MM-YYYY or DD/MM/YYYY format<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Float – Floating Point
Numbers<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Email – Email address
format<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>IPAddress – IP Address
format<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>USZipCode5 – US 5 digit
Zip Code<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>UZZipCode9 – US 9 digit
Zip Code<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>USZipCode5or9 – US Zip
Code (either 5 digit or 9 digit)<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>USTelephone – US Telephone
Numbers<o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>RowRackHeight – Something
used by us locally for locating equipment in out data center; Row #, Rack
#, and Unit Height # in Rack.<o:p></o:p></span></font></li>
</ol>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I hope you find this information useful. Also, if folks have
additional regular expressions they should contribute them to this forum so
they can be shared with everybody.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Take care!<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Nick<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The following module contains the Custom Field Validation
definitions for RT 3.6.0:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>/opt/rt3/share/html/Admin/CustomFields/Modify.html<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The following code begins at line 82; I removed the regexp
for “Years” and added new code beginning at line 89:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><& /Widgets/ComboBox,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> Name =>
'Pattern',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> Default =>
$CustomFieldObj->Pattern,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> Size => 50,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> Values => [<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#Mandatory).',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> '(?#Digits)^[\d.]+$',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#Float)^(\+|-)?([0-9]+\.?[0-9]*|\.[0-9]+)([eE](\+|-)?[0-9]+)?',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#DateYYYYMMDD)^(19|20)\d\d([-
/.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#DateMMDDYYYY)^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[-
/.](19|20)\d\d',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#DateDDMMYYYY)^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[-
/.](19|20)\d\d',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#Email)^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#IPAddress)^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#USZipCode5)^\d{5}$',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#USZipCode9)^\d{5}-\d{4}$',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#USZipCode5or9)^\d{5}(-?\d{4})?$',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#USTelephone)^1?\s*-?\s*(\d{3}|\(\s*\d{3}\s*\))\s*-?\s*\d{3}\s*-?\s*\d{4}$',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
'(?#RowRackHeight)^\d{2}-\d{2}-\d{2}$',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> '',<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> ],<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>&><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p style='margin:0in;margin-bottom:.0001pt;text-indent:-7.5pt'><b><font size=1
face=Arial><span style='font-size:7.5pt;font-family:Arial;font-weight:bold'>---------------------------------------------------------------------------------</span></font></b><o:p></o:p></p>
<p style='margin:0in;margin-bottom:.0001pt;text-indent:-7.5pt'><b><font size=1
face=Arial><span style='font-size:8.0pt;font-family:Arial;font-weight:bold'>Nick
Metrowsky</span></font></b><b><font size=1><span style='font-size:8.0pt;
font-weight:bold'><o:p></o:p></span></font></b></p>
<p style='margin:0in;margin-bottom:.0001pt;text-indent:-7.5pt'><b><font size=1
face=Arial><span style='font-size:8.0pt;font-family:Arial;font-weight:bold'>Consulting
System Administrator</span></font></b><b><font size=1><span style='font-size:
8.0pt;font-weight:bold'><o:p></o:p></span></font></b></p>
<p style='margin:0in;margin-bottom:.0001pt;text-indent:-7.5pt'><b><font size=1
face=Arial><span style='font-size:8.0pt;font-family:Arial;font-weight:bold'>303-684-4785
Office</span></font></b><b><font size=1><span style='font-size:8.0pt;
font-weight:bold'><o:p></o:p></span></font></b></p>
<p style='margin:0in;margin-bottom:.0001pt;text-indent:-7.5pt'><b><font size=1
face=Arial><span style='font-size:8.0pt;font-family:Arial;font-weight:bold'>303-684-4100
Fax</span></font></b><b><font size=1><span style='font-size:8.0pt;font-weight:
bold'><o:p></o:p></span></font></b></p>
<p style='margin:0in;margin-bottom:.0001pt;text-indent:-7.5pt'><b><font size=1
face=Arial><span style='font-size:8.0pt;font-family:Arial;font-weight:bold'><a
href="mailto:nmetrowsky@digitalglobe.com"><font size=1><span style='font-size:
7.5pt'>nmetrowsky@digitalglobe.com</span></font></a></span></font></b><b><font
size=1><span style='font-size:8.0pt;font-weight:bold'><o:p></o:p></span></font></b></p>
<p style='margin:0in;margin-bottom:.0001pt;text-indent:-7.5pt'><b><font size=1
face=Arial><span style='font-size:7.5pt;font-family:Arial;font-weight:bold'>DigitalGlobe
®, An Imaging and Information Company</span></font></b><o:p></o:p></p>
<p style='margin:0in;margin-bottom:.0001pt;text-indent:-7.5pt'><b><font size=1
face=Arial><span style='font-size:8.0pt;font-family:Arial;font-weight:bold'><a
href="http://www.digitalglobe.com"><font size=1><span style='font-size:7.5pt'>http://www.digitalglobe.com</span></font></a></span></font></b><o:p></o:p></p>
<p style='margin:0in;margin-bottom:.0001pt;text-indent:-7.5pt'><b><font size=1
face=Arial><span style='font-size:7.5pt;font-family:Arial;font-weight:bold'>---------------------------------------------------------------------------------</span></font></b><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>