# Help on form validation please :-)

**URL:** <https://forum.kirupa.com/t/help-on-form-validation-please/305125>\
**Category:** flash\
**Created:** [February 19, 2010, 2:01pm UTC](https://forum.kirupa.com/t/help-on-form-validation-please/305125 "2010-02-19T14:01:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![che\_boludo](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@che\_boludo](https://forum.kirupa.com/u/che_boludo)\
**Post date:** [February 19, 2010, 2:01pm UTC](https://forum.kirupa.com/t/help-on-form-validation-please/305125/1 "2010-02-19T14:01:02Z")

</div>

Hi,

I was hoping someone might be able to shed light on a newb kinda question.

I have a contact form that validates. The fields in the form are NAME, TELEPHONE, EMAIL and DATE.

I have it set up so if anything is left blank it will stop the operation (stop immediate propagation) but I would now like it to only stop if TELEPHONE or EMAIL is left blank. So if someone fills it all in except TELEPHONE it will still send. Or if they fill everything out except EMAIL it will send. But if they leave both TELEPHONE and EMAIL blank, it will stop the whole process.

Bellow is my current validation in AS3:

//validator  
if (name\_txt.text.length\<=0 || phone\_txt.text.length\<=0 || subject\_txt.text.length\<=0 || note\_txt.text.length\<=0)  
{  
e.stopImmediatePropagation( );  
feedback\_txt.text = “Error- No se pueden dejar espacios en blanco.”;  
} else {  
feedback\_txt.text = “Ufff, ya hueles a carro nuevo.”;  
mailAddress.data = variables;  
mailAddress.method = URLRequestMethod.POST;  
sendToURL(mailAddress);  
}

Help would be greatly appreciated 🙂

Thanks,  
CB
