RegularExpression to validate Telegram Id in ASP.Net

Last Reply 2 months ago By arunkurmi

Posted 2 months ago

Hello,

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

You are viewing reply posted by: arunkurmi 2 months ago.
Posted 2 months ago

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>