compare field validator

Posted on 2006-04-24
Medium Priority
Last Modified: 2012-06-21
I have a text box <asp:textbox, in this text box, I would like people to enter 8 digits and (1 letter or no letter) ( like 10034867B or 10034867), if not, an error message will come up. How should I set up the field validator? Thanks for help.
Question by:CochiseCounty
1 Comment

Accepted Solution

daniel_balla earned 500 total points
ID: 16526392
Just do a Regular Expressions Validator and fill in this expression: ^\d{8}[\d,a-zA-Z]{0,1}$
This will validate exactly 8 digits and then none or one letter or digit

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question