getValue(); if (!preg_match("/^[\S ]+$/", $value)) { throw new \Magento\Framework\Exception\LocalizedException( __('The sender name "%1" is not valid. Please use only visible characters and spaces.', $value) ); } if (strlen($value) > 255) { throw new \Magento\Framework\Exception\LocalizedException( __('Maximum sender name length is 255. Please correct your settings.') ); } return $this; } }