I have put my validations in DO_VALIDATE_INPUT of the view controller, which is the natural place to do validations. This works fine as it is called from the DO_HANDLE_DATA and performs the validations correctly.
However, the issue is that this method also gets called when user is going to edit mode. In other words, when page is displayed the mode is display, when user clicks on Edit, before going to Edit mode DO_VALIDATE_INPUT gets called, and if any validation fails here user is reverted back to display mode.
Anyone knows why DO_VALIDATE_INPUT is called when switching to Edit mode? Doesn't make sense to me.
Thanks
Ramin.