title: Validation on user registration form?
body: <p>i have made module in which i am trying to add validation like if the user had entered the characters in "Phone No" text filed and same on "Mobile No".<br>
  This will run when user had open the user registration form.<br>
  I have made this....</p>
  
  <pre><code>&lt;?php
  function form_intro_form_alter($form_id,&amp;$form){
      if($form_id == 'user_register' || $form_id == 'user_edit'){
          $form['Personal Information']['profile_pno']['#validate'] = array('form_intro_pno_validate' =&gt; array());   //profile_pno is for Phone No.
          $form['Personal Information']['profile_mno']['#validate'] = array('form_intro_mno_validate' =&gt; array());   //profile_mno is for Mobile No.
      }
  }
  
  
  function form_intro_pno_validate($element){
      if(!is_numeric($element['#value'])){
          form_set_error('profile_pno' , t('Please Enter Only Number in Phone no'));
      }
  }
  
  function form_intro_mno_validate($element){
      if(!is_numeric($element['#value'])){
          form_set_error('profile_mno' , t('Please Enter Only Number in Mobile no'));
      }
  }
  ?&gt;
  </code></pre>
  
  <p>the module name is form_intro.....<br>
  plz check it and send me replay...<br>
  this isn't working...it not giving any error when user had entered the characters.</p>