Page tree
Skip to end of metadata
Go to start of metadata

The PropertyValidationAuditor is a companion to I18NPropertyValidationAuditor. This auditor checks the values of a designated property. Use I18NPropertyValidationAuditor to check the values of internationalized properties (properties with language variants).

Class: info.magnolia.services.seo.audit.impl.PropertyValidationAuditor

In addition to the common auditor properties, this auditor can be configured with the following properties:

propertyName

required

Defines the node property name to be checked.

level

optional

Determines how a failed audit will be counted:

  • Error (auditErrors)

  • Warning (auditWarnings)

  • Note (auditNotes)

valuePattern

required

Defines a validation pattern as a Java regular expression to check the property value. If the property value does not match the value pattern, the audit will fail.

Example

Here is an example from the SEO module. You can find this configuration here: /modules/seo/config/auditManager/auditors/metaKeywordsValid

metaKeywordsValid: 
  active: true
  class: info.magnolia.services.seo.audit.impl.PropertyValidationAuditor
  description: Check for valid meta keywords (pre-prod)
  propertyName: keywords
  valuePattern: .{2,},.{2,},.+
  • No labels