=== modified file 'phone.module'
--- phone.module	2008-07-28 10:36:04 +0000
+++ phone.module	2008-07-28 10:48:26 +0000
@@ -21,7 +21,8 @@
     'ru_phone' => array('label' => t('Russian Phone Numbers')),
     'es_phone' => array('label' => t('Spanish Phone Numbers')),
     'au_phone' => array('label' => t('Australian Phone Numbers')),
-    'cs_phone' => array('label' => t('Czech Phone Numbers'))    
+    'cs_phone' => array('label' => t('Czech Phone Numbers')), 
+    'hu_phone' => array('label' => t('Hungarian Phone Numbers')),
    );
 }
 
@@ -67,6 +68,7 @@
        || $field['type'] == 'es_phone'
        || $field['type'] == 'au_phone'
        || $field['type'] == 'cs_phone'
+       || $field['type'] == 'hu_phone'
        ){ 
       	$columns = array(
         	'value' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
@@ -114,7 +116,8 @@
       			'ru_phone',
       			'es_phone',
       			'au_phone',
-      			'cs_phone'      			
+      			'cs_phone', 
+      			'hu_phone',
       			),
     ),
   );
@@ -154,7 +157,8 @@
       			'ru_phone',
       			'es_phone',
       			'au_phone',
-      			'cs_phone'      			
+      			'cs_phone', 
+      			'hu_phone',
       			),
     ),
   );
@@ -246,6 +250,9 @@
     	        if ($field['type'] == 'cs_phone') { 
 	          $node_field[0]['value'] = format_phone_number('cs', $node_field[0]['value'], $field);
 	        }	        
+    	        if ($field['type'] == 'hu_phone') { 
+	          $node_field[0]['value'] = format_phone_number('hu', $node_field[0]['value'], $field);
+	        }	        
 	      }
 	    }
 	  }
@@ -281,6 +288,9 @@
               if ($field['type'] == 'cs_phone' && !valid_phone_number('cs', $item['value'])) {
                 form_set_error($field['field_name'],t('"%value" is not a valid Czech phone number!<br>Czech phone numbers should contain only numbers and spaces be like 999 999 999 with an optional prefix of "+420" or "00420".', array('%value' => $item['value'])));
               }                 
+              if ($field['type'] == 'hu_phone' && !valid_phone_number('hu', $item['value'])) {
+                form_set_error($field['field_name'],t('"%value" is not a valid Hungarion phone number!<br>Hungarion phone numbers should contain only numbers and spaces be like 99 999 999 with an optional prefix of "+36" or "06".', array('%value' => $item['value'])));
+              }                 
             }
           }
       }      
@@ -308,6 +318,7 @@
   	|| $countrycode == 'es'
   	|| $countrycode == 'au'
   	|| $countrycode == 'cs'  	
+  	|| $countrycode == 'hu'  	
   	) { 
 	
         //drupal_set_message('langue = ' . $countrycode, 'error');
@@ -348,6 +359,7 @@
   	|| $countrycode == 'es'
   	|| $countrycode == 'au'
    	|| $countrycode == 'cs' 	
+   	|| $countrycode == 'hu' 	
   	) { 
 	
         //drupal_set_message('langue = ' . $countrycode, 'error');       

