diff --git a/core/modules/file/src/Plugin/Field/FieldType/FileItem.php b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php
index 27ce2ab..1abbe35 100644
--- a/core/modules/file/src/Plugin/Field/FieldType/FileItem.php
+++ b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php
@@ -170,6 +170,7 @@ public function instanceSettingsForm(array $form, array &$form_state) {
       '#description' => t('Separate extensions with a space or comma and do not include the leading dot.'),
       '#element_validate' => array(array(get_class($this), 'validateExtensions')),
       '#weight' => 1,
+      '#maxlength' => 256,
       // By making this field required, we prevent a potential security issue
       // that would allow files of any type to be uploaded.
       '#required' => TRUE,
diff --git a/core/modules/file/src/Tests/FileFieldExtensionMaxlengthTest.php b/core/modules/file/src/Tests/FileFieldExtensionMaxlengthTest.php
new file mode 100644
index 0000000..d876bea
--- /dev/null
+++ b/core/modules/file/src/Tests/FileFieldExtensionMaxlengthTest.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\file\Tests\FileItemTest.
+ */
+
+namespace Drupal\file\Tests;
+
+use Drupal\Core\Field\FieldDefinitionInterface;
+
+/**
+ * Tests the new entity API for the file field type.
+ */
+class FileFieldExtensionMaxlengthTest extends FileFieldTestBase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'File field Extension Maxlength',
+      'description' => 'Tests file fields Allowed Extension Maxlength using entity fields of the file field type.',
+      'group' => 'File',
+    );
+  }
+
+  /**
+   * Tests using entity fields of the file field type.
+   */
+  public function testFileFieldExtensionMaxlength() {
+    $field_name = strtolower($this->randomName());
+    $entity_type = 'node';
+    $bundle = 'article';
+
+    $this->createFileField($field_name, $entity_type, $bundle);
+
+    for($i = 0; $i <= 35; $i++){
+      $file_extensions[] = $this->randomName(3);
+    }
+
+    $file_extension = implode(', ', $file_extensions);
+
+    $edit = array(
+      "instance[settings][file_extensions]" => $file_extension,
+    );
+
+    $this->drupalPostForm("admin/structure/types/manage/$bundle/fields/node.$bundle.$field_name", $edit, t('Save settings'));
+    $this->assertNoText(t('Allowed file extensions cannot be longer than 128 characters'), t('The Allowed file extensions field is longer than 128 characters.'));
+  }
+
+}
