Validating a Registration Form Using Regular Expression in C#


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.


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


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.




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

Looking for more source code? Type your keyword here here!


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.