Change record status: 
Project: 
Introduced in branch: 
11.2.x
Introduced in version: 
11.2.3
Description: 

Symfony has a File validation constraint, which checks that a value is a valid file. It is now available to all core code. For example:

$field_definition->addConstraint('File', []);

Or in config schema:

constraints:
  File: []
Impacts: 
Module developers