OnBeforeSave
Smartsite 7.7 - ...
OnBeforeSave is called before the data (the Default Instance xml) is saved to the database.
This method can be used to e.g. execute custom validation on the data.
To abort the save action when the data is not valid, just throw an SmartsiteException with the error message to be displayed to the user.
In an advanced scenario, where you need to implement your own save logic and skip the built-in save logic, return DataEditorActionResult.CloseAction().
The normal save operation will then be aborted and the edit action will be closed.