make validation phone number with regex

hallo my name is malik junior dev from indonesian

i have a problem with create input data phone number with validation regex

first input number only NUMBER like = 0812345678910 (only number no +/-)

and i still confused about run server action, and i need pattern for phone number

thank you if you help me

Hi Malik, 

Can you refer answer from

Let me know if this is working

or you can refer also

Thanks, Aadhavan S

Hi Azure,

you could use the Regex_Replace and Regex_Search under Text extension module. Please check the sample implementation below that returns if PhoneNo is Valid. Additionally

Hope this helps!

Hi Malik, 

Try using this java script,

document.getElementById($parameters.WidgetId).addEventListener("keypress", function(e){

    var patternNotOk = eval("/[^0-9]/g");

    var text = this.value.replace(patternNotOk, '');

    if (this.value != text){

        this.value = text;



And use this on input widget event (OnKeyPress).

Hi Malik,

By the Regex you should try this pattern for phone no. 

Pattern = "^[0-9]{10}$"

It will not accept these characters (+, - , e, .)

Thanks & Regards


Simply Suggest, assign data type Phone Number



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.