title: Want to validate my email and telephone
body: <p>I need to make my email and telephone validated for the contact form.. theres code in there for email but its incorrect and not the proper way any help!
  i know it needs to were it says:</p>
  
  <pre><code>if(email.length == 0 || email.indexOf('@') == '-1')
  </code></pre>
  
  <p>but im now sure how to do this im very new to php, so go easy on me :) </p>
  
  <pre><code>var error = false;
  var name = $('#name').val();
  var email = $('#email').val();
  var subject = $('#subject').val();
  var message = $('#message').val();
  var tel = $('#tel').val();
  
      // Form field validation
  if(name.length == 0){
      var error = true;
      $('#name_error').fadeIn(500);
  }else{
      $('#name_error').fadeOut(500);
  }
  if(tel.length == 0){
      var error = true;
      $('#tel_error').fadeIn(500);
  }else{
      $('#tel_error').fadeOut(500);
  }
  if(email.length == 0 || email.indexOf('@') == '-1'){ **this is not the right way! help** 
      var error = true;
      $('#email_error').fadeIn(500);
  }else{
      $('#email_error').fadeOut(500);
  }
  if(subject.length == 0){
      var error = true;
      $('#subject_error').fadeIn(500);
  }else{
      $('#subject_error').fadeOut(500);
  }
  if(message.length == 0){
      var error = true;
      $('#message_error').fadeIn(500);
  }else{
      $('#message_error').fadeOut(500);
  }
  
  if(tel.length == 0){
      var error = true;
      $('#tel_error').fadeIn(500);
  }else{
      $('#tel_error').fadeOut(500);
  }
  </code></pre>