locked
DataAnnotations Validation RRS feed

  • Question

  • Hi,

    I'm using DataAnnotations to Validate a form and it's working nearly as expected 8-)

    I've binded a lot of fields (textboxes, comboboxes, datetimepickers...) with an instance of a "Data Annotated" class with several "required" properties.

    When I set a field as empty, it throws the expected exception and the form catches it and shows the error. It works the same way when I keep setting more fields to the "error" state (empty).

    The problem is, when I set a field with a "good value" (in this case, a not empty value) it clears ALL the errors in the form (and even in the ValidationSummary).

    Does anybody realize what's happening??

    Thanks in advance.

    Monday, September 26, 2011 5:06 AM

Answers