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 7580471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:55:33+00:00 2026-05-30T17:55:33+00:00

I am performing both clientside and serverside validation , clientside-jquery and serverside-asp.net I am

  • 0

I am performing both clientside and serverside validation , clientside-jquery and serverside-asp.net
I am using custom validators for checking numeric textboxes.The issue is there are few textboxes that need to check for numeric data and length of the data and also digits after decimal.so i guess i cannot create a common onservervalidate function for all of them as their validation needs differ.
So do i need to use different validation controls for all of them ..can i call three different method on one onservervalidate…
any suggestions thanks

  • 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-30T17:55:34+00:00Added an answer on May 30, 2026 at 5:55 pm

    You can use the regex class. Within that you only need one function to validate your data with all your requirements.

    the regex class is a powerful class where u can define complex patterns that the string has to match. this is one of my simpler regex validator function for my page which returns a boolean if the string send in the parameter (pass) matches the pattern.

        Public Function validatepass(ByVal pass As String) As Boolean
        Dim pattern As String = "^\S{6}\S*$"
        Dim MatchString As Match = Regex.Match(pass, pattern)
        If MatchString.Success Then
            Return True
         Else
            Return False
         End If
         End Function
    

    it works like this:
    Dim pattern As String = “^\S{6}\S*$”
    // in this line u define the pattern, ^ is the left end of the string, and $ is the right end
    \S{6} is matching the first 6 chars of the string and accepts ANY chars except whitespace chars
    \S* does nearly the same, but * means that it can be any number of chars ( again any chars except whitespace chars )

    so effectivly this pattern does not accept whitespaces and requires the string to be at least 6 chars long

    for a comprehensive guide u should read this :
    http://www.codeproject.com/Articles/9099/The-30-Minute-Regex-Tutorial

    and in ur case the regex pattern should be this : ^\d{10},\d{2}$

    u can use the same pattern syntax for serverside validation via a function like this, or clientside by creating a customregex validator and using the pattern in the appropriate property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am performing both clientside validation and server side validation using jquery and Asp.net
It appears that both jQuery and ASP.Net MVC have ways of performing AJAX functions.
Good day! I've found interesting behaviour for both LAMP stack and ASP.NET. The scenario:
I'm performing a bulk insert with an ADO.NET 2.0 SqlBulkCopy object from a C#
Personally I've been working for years with Telerik's RadControls and DevExpress ASP.NET controls. IMHO
Does in Backbone.Router exists the events both before and after performing routing? My app
I'm writing both client and server code using WCF, where I need to know
I'm currently developing a moderately large sized web app with ASP.NET 2.0 that uses
I have a Comment Model that I am using to store comments for both
I am performing a curl request to a page. I have set both 'CURLOPT_TIMEOUT'

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.