Forms validation or check up issues

Hi Guys,

I am doing some forms in Flash Cs4 with AS3. The forms are working well, but i have a code to check if people have enter information in every field. But the verification only works for 2 field. The code is exactly the same for the other but it doesn’t work. Can you double check my code and maybe explain me why it doesn’t work or maybe how to replace the validation code by another.

The validation works only for the LastName data and Email field.

Here’s the code;

submit_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend);

function ValidateAndSend(event:MouseEvent):void{

//validate form fields
if(!txtContactFirstName.length) {
status_txt.text = “*Please enter your first name.”;
} else if(!txtContactEmail.length) {
status_txt.text = “*Please enter an email address”;
} else if(!validateEmail(txtContactEmail.text)) {
status_txt.text = “*Please enter a VALID email address”;
} else if(!txtAccountCity.length) {
status_txt.text = “*Please enter a city.”;
} else if(!txtContactLastName.length) {
status_txt.text = “*Please enter your last name”;
} else {

status_txt.text = "Thanks " + txtContactFirstName.text + “your information has been sent!”;

Thanks guys