242
Views
6
Comments
Restrict Text data type field to alphabet
Question

Hi,

How can I restrict the input from useres only to alphabet in Text data type field?

Thank you.

2016-04-21 18-13-58
Nuno Rolo
 
MVP

Hi John,

If you look into the Forge there are several options of Masks that allow you to do that.

UserImage.jpg
John John

Hi Rolo,

Thanks for your answer.
After downloading a component like "Input Masks", how to use them?

2016-04-21 18-13-58
Nuno Rolo
 
MVP

That one, in particular, I think it has a page with samples.

But it's a webblock that you put next to the input, that block will need to have the input id and regex you need.

UserImage.jpg
John John

Thank you.
I will try.

UserImage.jpg
John John

Hi Rolo,

It works, but put line in the form and as part of the atribute in database.

2021-03-30 06-52-52
Ali Amin

Hi John,

You can use this regex to restrict the other character. it allows only alphabet.

/^[A-Za-z]+$/
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.