Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Document stop supporting getCMSValidator() #667

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading