Model Validation Strategies

Last modified by Admin on 2024/03/25 16:37

cogDefault Strategies for Model Validation
TypeJAR
CategoryAPI
Developed by

XWiki Development Team

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard

Compatibility

Since XWiki 12.0RC1

Installable with the Extension Manager

Description

Existing Strategies

The following Validation strategies are implemented by default and be configured in the Admin UI.

Character Replacement Strategy

This strategy allows you to define characters that are forbidden in a page name, and how to replace them.
For each forbidden character you define, you can specify a specific replacement character. Or you can chose to not specify a replacement character and in that case, forbidden cases will be just removed.

This strategy is selected by default, with / (slash) and \ (backslash) as forbidden characters, without replacements defined for them.

Preformatted Names Strategy

This strategy will normalize your page names to remove any special characters: only the latin alphabet (26 letters) without accents, the numbers and the character - (dash) are accepted. The accents are automatically transformed to the closest latin letter, and all other special characters are transformed to dashes, with some clean up to avoid redundant dashes.

Name Strategy Script Service

A script service is available to use name strategy components. It can be accessed with $services.modelvalidation.
You can check the API directly on the source.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.

Dependencies

Dependencies for this extension (org.xwiki.platform:xwiki-platform-model-validation-default 16.2.0):

Tags:
    

Get Connected