Validating a Registration Form Using Regular Expression in C#

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.

validationFormRegexFig.3 Regular Expression


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

Project Name : Validating a Registration Form Using Regular Expression in C#
Project Platform :C#
Programming Language Used:C# Programming Language
Developer Name
IDE Tool (Recommended):Visual Studio 2019
Project Type :Desktop Application
Upload Date and Time:June 18, 2016- 6:49 am

Leave a Comment