473,327 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Validate textbox with mask

I need to validate a packslip using a mask. In the past I have validated that all characters are numbers and that the first one is not zero. Now they want to be able to set a mask, such as 9XX99999XX where the X is either a letter or integer, 9 would be integer only.

This mask would be different for different suppliers.

Thank you in advance!
Jennifer
Apr 16 '09 #1
1 3221
Dormilich
8,658 Expert Mod 8TB
the best bet would probably be something around a Regular Expression.

using 9XX99999XX it should be something like
Expand|Select|Wrap|Line Numbers
  1. RE = /\d[a-z0-9]{2}\d{5}[a-z0-9]{2}/i;
  2. // sometimes [:alnum:] can be used for [a-z0-9]
an (more or less technical) explanation to the RegExp object can be found here.
Apr 16 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: msnews.microsoft.com | last post by:
Hello. How can I set input mask for TextBox? Or can I use for mask input some other control?
2
by: msnews.microsoft.com | last post by:
Hello. How can I set input mask for TextBox in Windows Form? For example I want to mask (format) TextBox for inputing phone number like (999) 999-99-99. The TextBox must first show something like...
0
by: Christian | last post by:
Hi all, on a PocketPC 2003 dialog I want the user to enter an IP-Adress using a TextBox control. Within the TextBox control I would like to display an predefined input mask like xxx.xxx.xxx.xxx ...
2
by: Alberto | last post by:
Can I set a mask to a TextBox? How? Thank you very much
2
by: Fernando Lopes | last post by:
Hi. How can i validate a date textbox using validator, but the validator need to validate all data types, like: USA: 11/19/2004 BRAZIL: 19/11/2004 GERMANY: 19.11.2004 So, in the validator...
3
by: Aaron Smith | last post by:
I found an quick and dirty example of a numeric text box that converts the string to a currency mask.. Here is the code: Public Class NumericMaskedTextBox Inherits System.Windows.Forms.TextBox ...
7
by: DazedAndConfused | last post by:
Curently I manualy code keypress edits. i.e. allow only 3 digits before decimal and two digits after decimal in .NET. Is there an easy solution to mask text boxes? The MSMASK32.OCX from vb6...
0
by: michels287 | last post by:
I have a masked textbox on my form. I have an onscreen keyboard with numbers only. The masked format for the masked textbox is: (###) ### - #### I want to make sure they enter the phone...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.