Issue #3203511: Improve filesize validation
Merged
requested to merge issue/file_extractor-3203511:3203511-improve-filesize-validation into 3.0.x
Compare changes
+ 12
− 44
@@ -4,6 +4,7 @@ declare(strict_types = 1);
@@ -4,6 +4,7 @@ declare(strict_types = 1);
@@ -61,7 +62,7 @@ class ExtractionSettingsFormHelper {
@@ -61,7 +62,7 @@ class ExtractionSettingsFormHelper {
'#description' => $this->t('Enter a value like "10 KB", "10 MB" or "10 GB" in order to restrict the max file size of files that should be extracted.<br /> Enter "0" for no limit restriction.'),
@@ -80,9 +81,9 @@ class ExtractionSettingsFormHelper {
@@ -80,9 +81,9 @@ class ExtractionSettingsFormHelper {
'#description' => $this->t('Enter a value like "1000", "10 KB", "10 MB" or "10 GB" in order to restrict the max size of the content after extraction.<br /> Enter "0" for no limit restriction.'),
@@ -99,52 +100,19 @@ class ExtractionSettingsFormHelper {
@@ -99,52 +100,19 @@ class ExtractionSettingsFormHelper {
$form_state->setError($form['extraction_result']['number_first_bytes'], $this->t('The size limit option must contain a valid value. You may either enter "0" (for no restriction) or a string like "10 KB", "10 MB" or "10 GB".'));
$form_state->setError($form['extractable']['max_filesize'], $this->t('The maximum file size option must contain a valid value. You may either enter "0" (for no restriction) or a string like "10 KB", "10 MB" or "10 GB".'));