tags:

views:

64

answers:

0

I want to know why I need to clear the (ActiveRecord) errorlist myself after Validate function have returned false once?

I use the following logic:

  1. Show user UI for entering text
  2. Validate object
  3. Showing user error message, ("to long text") and goto Goto to step 1.
  4. Save object.

After user have entered an text that does fit into the field, the error list is not cleared and Validate function fails even if text is corrected, because list is not empty. (Errors from prev. call is stil in list).

Is that an Subsonic bug? or is there any reason why I need to call Object.Errors.Clear() before I validate again?

If it an bug maybe a good idea is to clear the errorlist first when any object attribute changes. Because if object has not changed it is not any idea to check the attributes again.