hi @LL,
we are using simple code for validation in zip, but now we want to be able to type the word
"NONE" also.
How this code can be modified to do that?
case 'zip':
if ($inString=='') { appendError("Required Field"); }
else {
$length=strlen($inString);
switch($length)
{
default:
appendError("Must be 5 digit zip '00000', or zip 4 '00000-0000' or 'NONE'");
break;
case '5':
$pattern="^[[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]$";
$emailTest=ereg($pattern, $inString);
if (!$emailTest) { appendError("Only numbers allowed in zip"); }
break;
case '7':
$pattern="^[[:digit:]][[:digit:]][[:digit:]][[:space:]][[:digit:]][[:digit:]][[:digit:]]$";
$emailTest=ereg($pattern, $inString);
if (!$emailTest) { appendError("Canadian postal codes must be three digits, one space, three digits"); }
break;
case '10':
$pattern="^[[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]-[[:digit:]][[:digit:]][[:digit:]][[:digit:]]$";
$emailTest=ereg($pattern, $inString);
if (!$emailTest) { appendError("Not a valid Zip 4 format"); }
break;
ThanksMore Information:
- If a record with a similar name needs to be created in the same town (2 locations within one city) then an extra reference word can be added to the Alpha
- are many ways to add files to a zip archive via python, I have been unable to
- KeyedAccess is an add-on module for Microsoft Access that handles product key/unlock code validation, giving developers the ability to create secure trial
- This script allows you to specify certain form elements as "required" or "non-required" and also what specific type they have: text, password, numeric, zip code etc
- Redesigned report engine produces PDF and XLS (Excel) reports; Added the ability to zip report attachments to emailed reports; Added the ability to exclude spell checking of sections
- For instance, if you are shipping a product to the user, his street address, city, state, and zip would obviously be necessary
- adding check for at least 8 characters <asp:RegularExpressionValidator ControlToValidate="Password" ValidationExpression="
- The zip file includes a trial version of Rick Fisher's Find And Replace add-in
More:


LinkBack URL
About LinkBacks
Reply With Quote






















































Bookmarks