# TextField Input With Operators

**URL:** <https://forum.kirupa.com/t/textfield-input-with-operators/331829>\
**Category:** flash\
**Created:** [November 3, 2013, 4:28pm UTC](https://forum.kirupa.com/t/textfield-input-with-operators/331829 "2013-11-03T16:28:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blablob](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@Blablob](https://forum.kirupa.com/u/Blablob)\
**Post date:** [November 3, 2013, 4:28pm UTC](https://forum.kirupa.com/t/textfield-input-with-operators/331829/1 "2013-11-03T16:28:49Z")

</div>

I have this game that has a number of textfields with input and restrictions. These affect things such as the player size and his speed and things like that. For the restrictions, this is what I have:

```auto
input.restrict = "0-9\\-\\.";

```

So the player can include negative numbers and decimals. However, I want the player to be able to add, subtract, multiply and divide as well. And I’m not sure how to add this to the restrictions. If I did something like this:

```auto
input.restrict = "0-9\\-\\.\\+";

```

And I try to type something like “2+3” into the input field, I get NaN.

My question is, is there anyway to actually add operators to the restrictions field?
