39 \
Magento\Framework\Stdlib\StringUtils $stringHelper
42 $this->_string = $stringHelper;
127 $length = $this->_string->strlen(trim(
$value));
129 $validateRules =
$attribute->getValidationRules();
131 if (!empty(ArrayObjectSearch::getArrayElementByName($validateRules,
'input_validation'))) {
132 $minTextLength = ArrayObjectSearch::getArrayElementByName(
136 if ($minTextLength !==
null && $length < $minTextLength) {
137 $errors[] =
__(
'"%1" length must be equal or greater than %2 characters.',
$label, $minTextLength);
140 $maxTextLength = ArrayObjectSearch::getArrayElementByName(
144 if ($maxTextLength !==
null && $length > $maxTextLength) {
145 $errors[] =
__(
'"%1" length must be equal or less than %2 characters.',
$label, $maxTextLength);
extractValue(\Magento\Framework\App\RequestInterface $request)
__construct(\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Psr\Log\LoggerInterface $logger, AttributeMetadataInterface $attribute, \Magento\Framework\Locale\ResolverInterface $localeResolver, $value, $entityTypeCode, $isAjax, \Magento\Framework\Stdlib\StringUtils $stringHelper)
outputValue($format=\Magento\Customer\Model\Metadata\ElementFactory::OUTPUT_FORMAT_TEXT)