You'll begin by adding some validation logic to the attribute lets you set the maximum length of a string property, and optionally its minimum length.
Code First ensures that the validation rules you specify on a model class are enforced before the application saves changes in the database.
The validation rules and the error strings are specified only in the class.
If you want to change the validation logic later, you can do so in exactly one place.
Event Args e) Add the following to Initialize Component(): Box1. Event Handler (Box1_Lost Focus); HTH, mk Hi Patric, A bunch of events are fired when the control loses the focus.
The errors are enforced both client-side (using Java Script) and server-side (in case a user has Java Script disabled).
A real benefit is that you didn't need to change a single line of code in the object).
that indicates to user that a control on a form has error associated with it.
In other had it works as validation upon the controls to handle the error causes by inputting wrong by user.