# Blank text input validation

**URL:** <https://forum.kirupa.com/t/blank-text-input-validation/318550>\
**Category:** flash\
**Created:** [January 23, 2011, 9:08pm UTC](https://forum.kirupa.com/t/blank-text-input-validation/318550 "2011-01-23T21:08:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zoltar26](https://avatars.discourse-cdn.com/v4/letter/z/58f4c7/32.png) [@Zoltar26](https://forum.kirupa.com/u/Zoltar26)\
**Post date:** [January 23, 2011, 9:08pm UTC](https://forum.kirupa.com/t/blank-text-input-validation/318550/1 "2011-01-23T21:08:29Z")

</div>

Hi,

I created on stage 4 text-input fields and a “next” button.  
I have to check that all 4 text-fields are not empty so the user wouldn’t be  
able to click on the “next” button if one of this fields is blank.

here’s the code i’ve tried without success, the program got stacked in a loop:

```auto

eDetails_btn.onRelease = function() {
        var i:Number = -1;
        
        do {
            if (i <= numOfEmployees) {
                i++
            }else {
                i = 0;
            }// end if
        } while (eNum_txt.text != employees* || eNum_txt.text == null || eName_txt.text == null ||
                    eLastName_txt.text == null || eWeight_txt.text == null)
                
        gotoAndStop(3);
    }// end onRelease event

```

I’ve managed already to check if a user typed a correct answer but  
how to create a situation of which the user wouldn’t be able to click on the  
“next” button till all the fields a filled is beyond my grasp…

Thanks in advance for any help.
