Sto creando per la prima volta un modulo e all'interno sto mettendo un form. Voglio farci la validazione.
Non capisco perche' non mi funziona. Dove sbaglio?

<?php
// $Id$

/**
* Implements hook_help().
*/
function findacontractor_help($section='') {
    $output .= t('findacontractor_help');
    return $output;

}

/**
* Implements hook_menu().
*/
function findacontractor_menu() {
  $items['findacontractor-page'] = array(
    'title' => 'Find a Contractor',
    'page callback' => 'findacontractor_page',
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
    );
  return $items;
}

/**
* Implements hook_page().
*/
function findacontractor_page() {
  return drupal_get_form('findacontractor_myform');
}



function findacontractor_myform($form_state) {

  $form['name'] = array(   
  '#type' => 'textfield',   
  '#title' => t('Name'),   
  '#size' => 30,   
  '#maxlength' => 64,   
  '#description' => t('Enter the name for this group of settings'),
  );

// Acknowledgement
$form['disclaimer'] = array( 
  '#type' => 'checkbox',
//  '#id' => 'disclaimer',
  '#name' => 'disclaimer',  
  '#title' => t('I have read and Acknowledged the Bradford White Disclaimer.'),
  '#description' => t(''),

  ); 

// Address
$form['address'] = array(   
  '#type' => 'textfield', 
//  '#id' => 'address',
  '#name' => 'address',
  '#title' => t('Address (optional)'),
  '#size' => 26,
  '#maxlength' => 100,
  '#required' => FALSE,
  '#description' => t(''),
 
  );
 
// City
$form['city'] = array(  
  '#type' => 'textfield',
//  '#id' => 'city',
  '#name' => 'city',
  '#title' => t('City (required)'),
  '#size' => 18,
  '#maxlength' => 50,
  '#attributes' => $onchange_array,
  //'#required' => TRUE,
  '#description' => t(''),
  );

// State 
$state = drupal_map_assoc(
  array('Select One', 'ALBERTA', 'AK', 'AL', 'AR', 'AZ', 'BRITISH COLUMBIA', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MANITOBA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NEW BRUNSWICK', 'NEWFOUNDLAND', 'NH', 'NJ', 'NM', 'NOVA SCOTIA', 'NV', 'NY', 'OH', 'OK', 'OR', 'ONTARIO', 'PA', 'PRINCE EDWARD ISLAND', 'QUEBEC', 'RI', 'SASKATCHEWAN', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WI', 'WV', 'WY')
  ); 

$form['state'] = array(
  '#type' => 'select',
//  '#id' => 'state',
  '#name' => 'state',
  '#title' => t('State (required)'),   
  '#default_value' => variable_get('Select One', ""),   
  '#options' => $state,
  //'#required' => TRUE,
  '#description' => t(''),
  ); 
 
// Zip code
$form['zip'] = array( 
  '#type' => 'textfield', 
//  '#id' => 'zip',
  '#name' => 'zip_code',
  '#title' => t('Zip Code (required)'),
  '#size' => 7,
  '#maxlength' => 7,
  //'#required' => TRUE,
  '#description' => t(''),
  );
 
// longitude
$form['longitude'] = array(
  '#type' => 'hidden',  
  '#name' => 'longitude',
  '#value' => '', 
  );
  
// latitude
$form['latitude'] = array(
  '#type' => 'hidden',
  '#name' => 'latitude',
  '#value' => '',
  );

// submitbutton 
$form['submitbutton'] = array(
  '#type' => 'submit',
//  '#id' => 'submitbutton',   
  '#name' => 'submit',
  '#title' => t('submitbutton'),
  '#value' => t('Find Nearby Contractors'),
  '#description' => t(''),
); 

  $form['#validate'][] = 'findacontractor_myform_validate';
   
  return $form;
}

function findacontractor_myform_validate($form, &$form_state) { 
if ($form_state['values']['name'] == '') {
  form_set_error('', t('You must select a name for this group of settings.')
  ); 
}
}