Validating a Registration Form Using Regular Expression in C#

0
215

validationFormRegexFig.3 Regular Expression

Today, I will teach you how to validate a Registration Form using  Regular Expressions in C#. Regular Expression contains the formated rules and check lengths to validate the inputs of a certain texbox. This method is very useful because it will help you restrict each fields in the form.

 

Let’s get started:

 

Open Microsoft Visual Studio 2008 and create new Windows Form Application for C#. Then, do the following design of a Form as follows.

validationFormRegexFig.1

Go to the Solution Explorer, click the “View Code”  to make the code editor appear.

validationFormRegexFig.2

In the code editor, import the regural expression library above the namespace.

After that, create the following method inside the class. These methods are use to format the specific fields using the correct patern.

Go back to the design view, double click the button and do the following code for the validation of the registration form.

 

Output:

validationFormRegexFig.3

For all students who need programmer for your thesis system or anyone who needs a sourcecode in any programming languages. You can contact me @ :

 
Email – [email protected]
Mobile No. – 09305235027 – tnt

 

Download Sourcecode

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here