# Text Validation

**URL:** <https://forum.kirupa.com/t/text-validation/225224>\
**Category:** flash\
**Created:** [May 9, 2007, 7:57pm UTC](https://forum.kirupa.com/t/text-validation/225224 "2007-05-09T19:57:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wahiche](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@wahiche](https://forum.kirupa.com/u/wahiche)\
**Post date:** [May 9, 2007, 7:57pm UTC](https://forum.kirupa.com/t/text-validation/225224/1 "2007-05-09T19:57:58Z")

</div>

Ok here is the skinny. I wanted to create a login form, something very simple. So I found a tutorial online [http://www.5pieces.com/index.php/tutorials/comments/simple\_login/.](http://www.5pieces.com/index.php/tutorials/comments/simple_login/)

I figured that I could alter it a bit to suit my needs. I created an input text field with a variable of “password” (no quotes of course) and a MovieClip for the submit button with an instance name of submit\_btn. I put the following code in the 1st frame of the timeline:

```auto
submit_btn.onRelease = function() {
    if (password != "temp") {
        wp_txt._visible = true;
        trace("NOT WORKING");
    } else {
        trace("WORKING");
        rec_mc._visible = true;
        name_txt._visible = true;
        browse_butn._visible = true;
        upload_butn._visible = true;
        pass_label._visible = false;
        pass_txt._visible = false;
        submit_btn._visible = false;
    }
};

```

But for some reason no matter what text I use in the field after testing my movie it always traces back NOT WORKING. I have this problem a lot when I try to use an if statement to validate text.

Please help if you can.

Thanks in advance.
