Palocz Pal
By: a guest | Feb 7th, 2010 | Syntax:
PHP | Size: 1.05 KB | Hits: 84 | Expires: Never
<?php
// $Id: zipcode.hu.inc,v 1.9 2009/08/26 16:32:02 thierrygd Exp $
// Copyright 2008 Thierry GUEGAN http://www.arvoriad.com
/**
* @file
* CCK Field for Hungarian zipcodes.
*/
/**
* Verification for Hungarian zipcodes.
*
* @param string $text
* @return boolean Returns boolean FALSE if the zipcode is not valid.
* On success, returns a string containting the zipcode with some formatting.
*/
function valid_hu_zipcode($zipcodestring) {
$zipcodestring = trim($zipcodestring);
return FALSE;
}
//right now just do a quick check ==> has to be improved
//need to check more precisely by doing a query on a zipcode table, ...
else
{
return TRUE;
}
}
/**
* Formatting for zipcode.
*
* @param string $zipcodestring
* @return string Returns a string containting the zipcode with some formatting.
*/
function format_hu_zipcode($zipcodestring) {
$zipcodestring = trim($zipcodestring);
//do some formatting
return $zipcodestring;
}