# Zipcode Character Validation

**URL:** <https://forum.kirupa.com/t/zipcode-character-validation/292997>\
**Category:** flash\
**Created:** [July 21, 2009, 9:14pm UTC](https://forum.kirupa.com/t/zipcode-character-validation/292997 "2009-07-21T21:14:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dada78](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@dada78](https://forum.kirupa.com/u/dada78)\
**Post date:** [July 21, 2009, 9:14pm UTC](https://forum.kirupa.com/t/zipcode-character-validation/292997/1 "2009-07-21T21:14:49Z")

</div>

Hi,  
On the stage:  
Textfield called “inputTXT”.  
And a button called “Go”.

All I am trying to accomplish here is to have the input characters validated to be ONLY numbers and max 5. However, I don’t want to use:"inputTXT.restrict = “0123456789”.

Instead I would like to check if the characters entered after pressing the “go” btn, are within the defined parameters above (numbers and max5). If yes, then I need to pass a URL, if not then I need to display an error message.

I looked at so many solutions but none seem to have worked.

Thanks in advance for your support!
