Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4574462
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:55:34+00:00 2026-05-21T19:55:34+00:00

I want to make a validation on the name, to force the user to

  • 0

I want to make a validation on the name, to force the user to input his name in four sections (four names). How to do that on the client side, using asp.net validation?

<td style="text-align: right;" class="style1">
    <asp:TextBox ID="txt_addName" runat="server" Width="220px" ValidationGroup="add"></asp:TextBox>
    <cc1:TextBoxWatermarkExtender ID="txt_addName_TextBoxWatermarkExtender" 
        runat="server" Enabled="True" TargetControlID="txt_addName"
        WatermarkText="أدخل اسم المحاضر رباعيا" WatermarkCssClass="watermark">
    </cc1:TextBoxWatermarkExtender>
    &nbsp;
    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
         ControlToValidate="txt_addName" Display="Dynamic" ErrorMessage="!"     
         ValidationGroup="add"></asp:RequiredFieldValidator>
    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="*"
        ValidationExpression="^(?:\p{L}+\s+){3}\p{L}+$" ControlToValidate="txt_addName"
        Display="Dynamic" ValidationGroup="add">يجب أن يكون اسم المحاضر رباعيا 
    </asp:RegularExpressionValidator>
</td>
<td style="text-align: center; width: 550px;">
     <asp:Button ID="btn_addNewLecterer" runat="server" Font-Bold="True" Font-Names="Garamond"
          Font-Size="Medium" Text="أضف محاضر جديد" OnClick="btn_addNewLecterer_Click" ValidationGroup="add" />
</td>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:55:35+00:00Added an answer on May 21, 2026 at 7:55 pm

    Something like this should work:

    ^(?:\p{L}+\s+){3,}\p{L}+\s*$
    

    Explanation:

    ^      // start at the beginning of the string
    (?:    // start a non-capturing group
    \p{L}  // match any unicode letter...
    +      // ...at least one of them...
    \s+    // ...followed by at least one white-space character
    )      // end the non-capturing group
    {3,}   // repeat the group at least three times
    \p{L}+ // finish with at least one unicode character...
    \s*    // ...that can optionally be followed by white-space...
     $     // ...and then the string should end
    

    If you want to limit the expression to require exactly four sections (I interpreted the question as requiring at least four), you change it to:

    ^(?:\p{L}+\s+){3}\p{L}+$
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want make validation jquery without using from plugin , problem is here that
I want as well as Client Side Validation as Server Side Validation. I realized
Typically when writing a web-app we want to perform validation on both client side
If I want to validate my input, should I make validation code as private
I am using remote validation to make sure that the email and username fields
I want make datetimepicker in my project. Using jquery how it is possible? I
I want make interactive application where user launches it and can do various task
I have style sheet with a class name changebackgroundcolor i want make change in
I am traversing a HTML document using javascript DOM. I want make a list
I'm doing something similar to the remote validation, except that I already make my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.