VideoUploadTranscodeWidget.php in Video 8.2
File
modules/video_transcode/src/Plugin/Field/FieldWidget/VideoUploadTranscodeWidget.php
View source
<?php
namespace Drupal\video_transcode\Plugin\Field\FieldWidget;
use Drupal\video\Plugin\Field\FieldWidget\VideoUploadWidget;
use Drupal\Core\Form\FormStateInterface;
class VideoUploadTranscodeWidget extends VideoUploadWidget {
public static function validateMaxFilesize($element, FormStateInterface $form_state) {
if (!empty($element['#value']) && Bytes::toInt($element['#value']) == 0) {
$form_state
->setError($element, t('The option must contain a valid value. You may either leave the text field empty or enter a string like "512" (bytes), "80 KB" (kilobytes) or "50 MB" (megabytes).'));
}
}
public static function process($element, FormStateInterface $form_state, $form) {
return parent::process($element, $form_state, $form);
}
}