title: AS3 validate form fields?
body: <p>I wrote a AS3 script, i have 2 fields to validate, i.e email and name. </p>
  
  <p>For email i use:</p>
  
  <pre><code>function isValidEmail(Email:String):Boolean {
      var emailExpression:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i;    
      return emailExpression.test(Email); 
  }
  </code></pre>
  
  <p>How about name field? Can you show me some sample code?</p>
  
  <p>EDIT:</p>
  
  <p>Invalid are:</p>
  
  <ul>
  <li><p>blank</p></li>
  <li><p>between 4 - 20 characters</p></li>
  <li><p>Alphanumeric only(special characters not allowed)</p></li>
  <li><p>Must start with alphabet</p></li>
  </ul>