I18NPropertyValidationAuditor
The info.magnolia.services.seo.audit.impl.I18NPropertyValidationAuditor is a companion to PropertyValidationAuditor
. Instead of validating the definition of a node property for the default language, the auditor can validate the values of a designated property for all or some of the available languages for the site.
The auditor only validates the property values and will not check that all language variants of a property defined. Use I18NPropertyDefinitionAuditor to check that all required language variants of a property are defined.
|
- Class
-
info.magnolia.services.seo.audit.impl.I18NPropertyValidationAuditor
Properties
In addition to the common auditor properties, this auditor can be configured with the following properties:
Property | Description |
---|---|
|
required Defines the node property name to be checked. |
|
optional Determines how a failed audit will be counted:
|
|
optional Controls what languages for the property will be checked.
|
|
optional Defines a list of the languages to be checked for language variants of the property. It can be a subset of the languages defined for the site. Languages not included in will not be checked. This property will be used only if |
|
optional Defines a validation pattern as a Java regular expression to validate the property for a particular language. If the property values does not match the value pattern for the language the audit will fail. If it does not have an entry for a particular language, |
|
optional Defines a default validation pattern as a Java regular expression. |
Example
Here is an example from the SEO module. You can find this configuration here: /modules/seo/config/auditManager/auditors/i18nWindowTitleValid
.
i18nWindowTitleValid:
active: true
class: info.magnolia.services.seo.audit.impl.I18NPropertyValidationAuditor
defaultValuePattern: .{5,}
description: Check for valid I18N window title (pre-prod)
propertyName: title