Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Validation summary without other validations

I would like to display the summary of validation in a validation summary with out displaying them in invidual validator means i would like to show only errors in Validation summary i don't want to show in any

like image 543
Vivekh Avatar asked Jul 05 '11 08:07

Vivekh


2 Answers

Set display="none" on your validation controls. This will hide the validation text for the individual validation controls.

Then give them all a validation group linked to a ValidationSummary

like image 53
Curtis Avatar answered Sep 22 '22 22:09

Curtis


An alternative solution is to use both ErrorMessage and Text properties of the Validator controls.

  1. Give your Validator controls, post back controls (Buttons, posting Dropdowns etc.) and ValidationSummary control the same ValidationGroup value.
  2. Set * on Text property for your Validators.
  3. Set the value you want to display on ValidationSummary for each of your Validators to ErrorMessage property.

This way you will have your validation descriptions (ErrorMessage) displayed at ValidationSummary control and a * (Text) displayed next to controls that failed validation.

like image 24
Yiğit Yener Avatar answered Sep 23 '22 22:09

Yiğit Yener