Skip to content

Commit

Permalink
DOC Document stop supporting getCMSValidator()
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jan 8, 2025
1 parent 9836332 commit 298caeb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions en/08_Changelogs/6.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,12 @@ The `extendValidationResult()` method and the `updateValidationResult` extension
> [!IMPORTANT]
> As part of this change method signature of `FormField::validate()` changed so that it no longer accepts a parameter, and not returns a `ValidationResult` object instead of a boolean.

### `getCMSValidator` method no longer supported {#getcmsvalidator}

In a `DataObject` subclass, you used to be able to implement a `getCMSValidator()` method and return a [`Validator`](api:SilverStripe\Forms\Validation\Validator) for validating edit form submissions in the CMS.

This is no longer supported. Instead, you should override the [`DataObject::getCMSCompositeValidator()`](api:SilverStripe\ORM\DataObject::getCMSCompositeValidator()) method as described in [validation in the CMS](/developer_guides/forms/validation/#validation-in-the-cms).

### Most extension hook methods are now protected {#hooks-protected}

Core implementations of most extension hooks such as `updateCMSFields()` now have protected visibility. Formerly they had public visibility which meant they could be called directly which was not how they were intended to be used. Extension hook implementations are still able to be declared public in project code, though it is recommended that all extension hook methods are declared protected in project code to follow best practice.
Expand Down

0 comments on commit 298caeb

Please sign in to comment.