We use sa_validate() within system events to validate the database. As such, the procedure's return value is checked for successful runs.
The v12.0.1 doc does state the following:
The procedure returns a single column named Messages. Errors returned during validation appear in the column. If validation succeeds without error, the column contains No error detected.
Well, that's only correct when the SA system language is set to EN.
For German setups, the message is "Keine Fehler gefunden" (and in earlier versions it was "Kein Fehler gefunden"). So, as we are usually running "DBLANG DE", the event code checks for the German message to know whether the validation has succeeded.
You bet I was puzzled when a database on a test system claimed to fail validation - simply as I had run an English version here, and "No errors detected" didn't fit "Keine Fehler gefunden".
Suggestion: Please add a second column to sa_validate()'s result set with a numeric return code (a SQLCODE or something similar to the "software component exit codes") that allows a language-agnostic return value check. Say, if the result set would contain something like "error_code = 0" for successful runs, the check would be much easier.
I do not know whether the result set may contain several rows in case there are several validation errors (i.e. a separate entry for each message about an invalid page/whatever) - however, that would still allow each entry to have its own error code.