RegularExpression to validate Telegram Id in ASP.Net

Hariom
 
on Jan 03, 2020 06:12 AM
Sample_909810.zip
1926 Views

Hello,

I want to validate user to enter Telegram Id like @abcd by regularexpression validator in asp.net

Download FREE API for Word, Excel and PDF in ASP.Net: Download
arunkurmi
 
on Jan 03, 2020 06:12 AM

Hi Hariom,

I will get back to you soon.

arunkurmi
 
on Jan 03, 2020 06:44 AM

Hi Hariom,

Check the below Regular Expression.

HTML

Enter Telegram ID :
<asp:TextBox ID="txtTelegram" runat="server" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Enter Correct Telegram ID"
    ControlToValidate="txtTelegram" ForeColor="Red" SetFocusOnError="true" ValidationExpression="@([a-z]{4})*$"></asp:RegularExpressionValidator>