Install
Works with Drupal: ^10.3 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
358.73 KB
MD5: 86ac0ccd864466275cc1f3a7d73733ea
SHA-1: 6d82ac301d4df2aebba7212e0f1ae05907016628
SHA-256: ff63a5d1a23050fe56fc1d3fab4b759cbfd0d1320da1a263ed546d026685dd24
Download zip
411.83 KB
MD5: 739fa84b3d4286107aba8dc375632dd4
SHA-1: 7a40a337a9b5c6c7aaba81cc656033093b2e8d08
SHA-256: 8cf6cbec2f351b479cefc987566b892b4df3f084acc48d01c7048d8507a60dd7
Release notes
First release. Vale checks the prose in text fields against your style guide with the Vale linter, on every save that validates, and reports what stored content already holds.
- A field opts in under Prose checks in its settings, with a minimum level, a level for any rule, and a profile that
.vale.inisections match. Text and plain text fields can opt in, including fields on paragraphs. - Checks run as a validation constraint, so forms, JSON:API and REST all apply them. An error stops the save and is marked on the field it came from, with every error in the value listed at once. Warnings and suggestions are shown to the author, and in JSON:API they arrive in
meta.vale. - Markdown is linted as Markdown and HTML as HTML, through a format-to-extension map, so code blocks are not checked as prose.
- With
publish_only, drafts save with their errors and only the save that publishes is refused. It follows Content Moderation states. - Publishing a workspace checks its changes first.
workspace_modeblocks the publish on errors, lists the alerts, or skips the check. - Reports > Prose linting lists the alerts in stored content, with filters by bundle, level and rule, a CSV export, a batch scan and a bulk action. Saves and deletes keep its rows current after the response is sent.
drush vale:lintchecks stored content or a workspace's changes and exits with 1 on an error, so a deploy can depend on it.vale:check,vale:rulesandvale:statussit beside it.POST /vale/checkreturns the alerts that saving some text in a field would give, with the sentence around each one. It checks field access, and is rate limited per user and capped across the site.drush vale:installdownloads the latest Vale release for the machine it runs on and checks it against the release's published checksum.- The binary and
.vale.inipaths are read fromsettings.phponly, because Vale's script rules run code. Results are cached until the text or the styles change.
Known limitations: base fields such as the title and a body's summary are not checked, nor is anything saved without validation, such as a migration. Inside a workspace with publish_only, paragraphs save before their page is refused, so the refused page can leave paragraph revisions behind. Sites that ran a development snapshot need to reinstall the module, because pre-release schema changes have no update path.