Form validation problems

I am using the below script to validate a form. everything works except the email validation and the combo box “rso” (not highlighted). Any help is appreciated.

indexOfAt = email2.text.indexOf("@");
    lastIndexOfDot = email2.text.lastIndexOf(".");

errorcode = "";
    if (consent2 == false){
        errorcode += "You must indicate your agreement with the terms of this offer to continue
";}
    
    if (coname.text == null || coname.text == ""){
        errorcode += "You must enter your company name
";}

    if (email2.text == null || email2.text == ""){
        errorcode += "You must enter your email address
";}

    if (confirmEmail.text == null || confirmEmail.text == ""){
        errorcode += "Please enter your email address in both fields
";}
    
    if (email2.text != confirmEmail.text){
        errorcode += "The email addresses do not match
";}
if (indexOfAt !=-1 && lastIndexOfDot !=-1){
    if (lastIndexOfDot <indexOfAt) {
        errorcode += "Please verify your email

";}
else {
errorcode += "Please enter correct email address
";}

if (rso.getValue() == Select One || rso.getValue() == ""){
    errorcode += "You must select a RSO

";}

 if (policy1.text == null || policy1.text == ""){
        errorcode += "You must enter your policy number
";}
        
    if (subpolicy1.text == null || subpolicy1.text == ""){
        errorcode += "You must enter your sub policy number
";}
        
    if (billgroup1.text == null || billgroup1.text == ""){
        errorcode += "You must enter your bill group number
";}
    
//error Alert        

    if (errorcode <> "") {
        Alert.show(errorcode,"Please try again...                              ");} 
        
    else {

    formData.sendAndLoad("http://x/email.php", replyData, "POST");}}

Thanks