locked
Validation problem in navigation application RRS feed

  • Question

  • Hi,

    I have a base class for my entity models like the code of blow link

    http://johnpapa.net/silverlight/enabling-validation-in-silverlight-4-with-idataerrorinfo/

    And I set NotifyOnValidationError and ValidatesOnNotifyDataErrors of my models binding on True

    Then I check validation in the set parts of my models properties

    But when a property is not valid the app don't show any error, what is wrong?

    Thanks

    Friday, October 8, 2010 4:40 PM

Answers

  • Which controls do you use to bind your entity models to?

    The DataForm should show all validation errors out-of-the-box. But if you bind a property value to an individual, ordinary TextBox, you'll see nothing, because it has no built-in animated sprinkling red validation eye candy fireworks.


    Friday, October 8, 2010 4:48 PM

All replies

  • Which controls do you use to bind your entity models to?

    The DataForm should show all validation errors out-of-the-box. But if you bind a property value to an individual, ordinary TextBox, you'll see nothing, because it has no built-in animated sprinkling red validation eye candy fireworks.


    Friday, October 8, 2010 4:48 PM
  • Thanks mepfuso

    When I move my fields to DataForm the animated validation shown.

    Some days a go in my SL Business app, I haven't this problem and my fields validation works well without DataForm control.

    How SL Business app can do this without DataForm?

    Saturday, October 9, 2010 7:43 AM
  • The DataForm implements a lot of validation scenarios so that we don't have to reinvent the wheel. But of course you can also do it yourself. Here is an example of how to show validation errors without the DataForm:


    http://silverlighttips.com/post/2009/10/08/SilverlightValidationTextBox.aspx


    Tuesday, October 12, 2010 8:25 AM