By default DevForce validates every entity on the server before saving it to the data source.
The default validation behavior can be modified by overriding the ValidateSave method in a custom EntityServerSaveInterceptor.
Unknown macro: IBNote
The "IBNote" macro is not in the list of registered macros. Verify the spelling or contact your administrator.
Also see the topic on server-side validation for more information.
Handling validation errors
If any validation errors are encountered on the server, there are two mechanisms by which these errors are reported back to the EntityManager that performed the save:
- Any errors will be propagated back to the "errant" entities within the calling EntityManager's cache and each of these entities will have its EntityAspect.ValidationErrors property automatically updated. If these entities have been bound to a client side UI and because of the eventing behavior provided by the ValidationErrors property and DevForce's implementation of the INotifyDataErrorInfo and IDataErrorInfo interfaces these errors should appear immediately in the client side UI.
- The EntityManagerSaveException.EntitiesWithErrors property of the EntityManagerSaveException reported by the EntityManager.Saved event and the SaveResult, will contain these errant entities.
Any errors encountered can then be corrected and the save resubmitted.