Allow validators passed to file_validate to use callable syntax

Created on 12 April 2023, over 1 year ago
Updated 23 June 2023, over 1 year ago

Problem/Motivation

Currently file_validate takes and array of validators keyed by function name. We can use the syntax accepted by \Drupal\Core\Security\DoTrustedCallbackTrait::doTrustedCallback to specify a class method or a service much like \Drupal\Core\Controller\ControllerResolver and \Drupal\Core\Render\Renderer::doCallback does.

Steps to reproduce

Proposed resolution

Add logic to look up file validators by class method or service definition and call doTrustedCallback() on them.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
File systemΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024