Skip to content

Oma10ar/ErrorProvider

Repository files navigation

ErrorProvider Project - Data Validation

This project is a simple C# Windows Forms application designed to demonstrate how to use the ErrorProvider component to validate user input and display error messages when required fields are left empty.

Features

  • Real-time Validation: The application validates input as soon as the user leaves a field (using the Validating event).
  • Visual Feedback: Displays an error icon next to the field that contains invalid data.
  • User Experience: Clearly indicates which mandatory fields need to be filled.

Key Components

The following components are implemented in Form1.cs:

  • ErrorProvider: Manages the display of error icons and messages.
  • txtFirstName_Validating: Ensures the First Name field is not empty.
  • txtLastName_Validating: Ensures the Last Name field is not empty.
  • button1_Click: Resets the form by clearing all text fields.

How to Run

  1. Open the solution file ErrorProvider.slnx or the project ErrorProvider.csproj in Visual Studio.
  2. Ensure the Target Framework is set to v4.7.2.
  3. Build and run the project.

Technical Specifications

  • Language: C#
  • Framework: .NET Framework 4.7.2
  • Type: Windows Forms Application

If you would like to add more advanced validation rules, such as email format verification or numeric input constraints, feel free to ask!

About

Task in course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages