Validators can be used to check for proper configuration and the existence of certain objects to ensure an application will run properly, such as:
Validate pipeline roots
Detect wiki rendering exceptions and CSP violation issues, including for example, script tags without nonces and inline event handlers. Any wikis triggering this validator will be listed with a description of the issue and link.
Subscribers to premium editions of LabKey Server can learn about making wikis compliant with a strict CSP in this topic:
This validator will report where guests (anyone not logged in, i.e. anonymous "public" users) have access to your server.
Validating many folders can take a long time. Checking the Run in the background box will run them in a background pipeline job, avoiding proxy timeouts that a 'foreground' job might encounter.
If you run in the background, you'll see the pipeline status page for the job and can click Data when it is complete to see the same results page as if the job had run in the foreground.
To run validation on a given project, folder, or folder tree:
Any validator should implement SiteValidationProvider, or more likely, the subclass SiteValidationProviderImpl. The methods getName() and getDescription() implement the name and description for the validator.
The boolean flag isSiteScope() controls whether the validator is site-scoped. The boolean flag shouldRun() controls whether the validator is applicable to a given container.
The method runValidation() returns a SiteValidationResultList of validation messages that will be displayed on the validation page in the admin console.
The messages can be set at different levels of severity: info, warn, or error. Errors will appear in red on the validation page. There are helper methods on SiteValidationResultList to aid in building the list. To build compound messages, SiteValidationResult behaves much like a StringBuilder, with an append() that returns itself.
An example validator that checks whether any Guest users have read or edit permissions: PermissionsValidator.java.