title: Problem with email validation: Invalid procedure call or argument: 'Mid'
body: <p>I tried to control email address and reviewer's name with the following code but I received this error.</p>
  
  <p>Microsoft VBScript runtime  error '800a0005'</p>
  
  <p>Invalid procedure call or argument: 'Mid' </p>
  
  <p>Cant I compare Mid(REVIEWEREMAIL, InStr(1, REVIEWEREMAIL, "@", 1), 1) to "@"?</p>
  
  <pre><code>  If Len(REVIEWERNAME) &lt; 2 Then
     with response
      .write "Error! Please fill in valid name. &lt;br /&gt;"
     end with
    ElseIf Len(REVIEWEREMAIL) &lt; 3 Then
     with response
      .write "Error! Please fill in valid email address. &lt;br /&gt;"
     end with
    ElseIf Mid(REVIEWEREMAIL, InStr(1, REVIEWEREMAIL, "@", 1), 1) &lt;&gt; "@" Then
     with response
      .write "Error! Please fill in valid email address. &lt;br /&gt;"
     end with
    Else
  
                 insert...
  
  End If
  </code></pre>