diff --git a/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml
index f518ecb6644fa629d5c8719b736c1920b516f136..72c924620c3b179c8b8bf4d7316fbd65e83feb71 100644
--- a/core/modules/system/config/schema/system.schema.yml
+++ b/core/modules/system/config/schema/system.schema.yml
@@ -121,6 +121,8 @@ system.date:
 system.diff:
   type: config_object
   label: 'Diff settings'
+  constraints:
+    FullyValidatable: ~
   mapping:
     context:
       type: mapping
@@ -129,9 +131,17 @@ system.diff:
         lines_leading:
           type: integer
           label: 'Number of leading lines in a diff'
+          constraints:
+            # @see \Drupal\Component\Diff\DiffFormatter
+            Range:
+              min: 0
         lines_trailing:
           type: integer
           label: 'Number of trailing lines in a diff'
+          constraints:
+            # @see \Drupal\Component\Diff\DiffFormatter
+            Range:
+              min: 0
 
 system.logging:
   type: config_object