Ramco Ramco

Ramco Ramco

  • 443
  • 3.4k
  • 526.3k

Pattern at one Location

Sep 8 2024 4:41 AM

Hi

  In below code i have used Pattern . I want to declare this line at one location. Whenever it is changed effect takes place on all Aspx pages. It should appear in SweetAlert.

pattern="[a-zA-Z\s\.]*" title="Valid characters: Alphabets/Space & . (Dot)" .

<div class="col-lg-6 col-md-6 col-sm-12">
    <div class="form-group">
        <label>Department Name</label>&nbsp;<span style="color: red">*</span>
        <asp:TextBox ID="txtDepartmentName" MinLength="2" MaxLength="50" class="form-control" placeholder="Department Name" required="true"
            pattern="[a-zA-Z\s\.]*" title="Valid characters: Alphabets/Space & . (Dot)" runat="server"></asp:TextBox>
    </div>
</div>
<div class="col-lg-6">
    <div class="form-group">
        <label>Short Name</label>
        <asp:TextBox ID="txtShortName" MinLength="2" MaxLength="15" class="form-control" placeholder="Short Name" required="true"
            pattern="[a-zA-Z\s\.]*" title="Valid characters: Alphabets/Space & . (Dot)" runat="server"></asp:TextBox>
    </div>
</div>

Thanks


Answers (4)