This question is locked. New answers and comments are not allowed.
Hi,
i am experienced a strange problem with the Grid and Validation Summary
here the scenario:
1- i have a Grid to display the car details
2- user can edit the details in Popup mode
3- i want to display the validation errors in Validation Summary and not Validation Message
4- i am using IValidatableObject to validate the user inputs and CustomValidation
problem:
1- if i made the built in attribute validation, then the validation summary displays the errors correctly
2- if i made custom validation, validation summary fails to display but surround the field by red ref: (ViewModels.CustomValidator for car type field)
3- if errors return by the Validate function, validation summary fails to display ref: (ViewModels.Car for country field)
problem facing:
1- try to set the country on edit to N/A and click update, nothing will be displayed however ModelState.IsValid is false
2- try to set the car type on edit to N/A and click update, the field will be red but no displayed message in the validation summary
3- try to clear the Name field and click update, the field will be red and validation summary will be displayed correctly
I am not able to figure out why validation summary not displaying in all cases, and how to fix this please?
thanks in advance
i am experienced a strange problem with the Grid and Validation Summary
here the scenario:
1- i have a Grid to display the car details
2- user can edit the details in Popup mode
3- i want to display the validation errors in Validation Summary and not Validation Message
4- i am using IValidatableObject to validate the user inputs and CustomValidation
problem:
1- if i made the built in attribute validation, then the validation summary displays the errors correctly
2- if i made custom validation, validation summary fails to display but surround the field by red ref: (ViewModels.CustomValidator for car type field)
3- if errors return by the Validate function, validation summary fails to display ref: (ViewModels.Car for country field)
problem facing:
1- try to set the country on edit to N/A and click update, nothing will be displayed however ModelState.IsValid is false
2- try to set the car type on edit to N/A and click update, the field will be red but no displayed message in the validation summary
3- try to clear the Name field and click update, the field will be red and validation summary will be displayed correctly
I am not able to figure out why validation summary not displaying in all cases, and how to fix this please?
thanks in advance