# Textfiled.restrict() problems

**URL:** <https://forum.kirupa.com/t/textfiled-restrict-problems/111364>\
**Category:** Uncategorized\
**Created:** [May 26, 2004, 8:13am UTC](https://forum.kirupa.com/t/textfiled-restrict-problems/111364 "2004-05-26T08:13:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mindfriction](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mindfriction/32/172_2.png) [@mindfriction](https://forum.kirupa.com/u/mindfriction)\
**Post date:** [May 26, 2004, 8:13am UTC](https://forum.kirupa.com/t/textfiled-restrict-problems/111364/1 "2004-05-26T08:13:37Z")

</div>

Hi guys,

Im trying to using the retrict function of textfield to allow numbers, the alphabet and the @ and . (fullstop). Essentially its for a login page im creating where users login using their email address.

For some reason I cant get it to allow fullstops (.), and the backspace key doesnt work to delete stuff in the field.

Here’s what I have:

```auto

username_txt.restrict="a-zA-Z0-9@\\.";

```

Anyone got any clues?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 8:20am UTC](https://forum.kirupa.com/t/textfiled-restrict-problems/111364/2 "2004-05-26T08:20:57Z")

</div>

Ahah I figured it out! For some \*\*\*\* reason because the text field was set to italics the . wasnt showing…weird!?

Anyway whateva 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 8:24am UTC](https://forum.kirupa.com/t/textfiled-restrict-problems/111364/3 "2004-05-26T08:24:07Z")

</div>

username\_text.restrict=“a-z A-Z 0-9 @ \.”;

worked like a charm.

sam

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 9:54am UTC](https://forum.kirupa.com/t/textfiled-restrict-problems/111364/4 "2004-05-26T09:54:56Z")

</div>

> [@maximum\_flash](#):
>
> username\_text.restrict=“a-z A-Z 0-9 @ \.”;
> 
> worked like a charm.
> 
> sam

Yer true, it works… it was just that silly italics thing, dont think font outlines were working to well in the font I was using ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 9:39pm UTC](https://forum.kirupa.com/t/textfiled-restrict-problems/111364/5 "2004-05-26T21:39:51Z")

</div>

yea, thats goofy.

oh well, glad it is working!

cya man.

sam
