Questions tagged «address-attribute»

3
在后端Magento 2中添加自定义验证街道地址字段
我想在管理员端为街道地址字段设置最小长度值 我想设置min_text_length = 5为Street Address外地客户地址表 我正在尝试更新属性但不起作用 public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { if (version_compare($context->getVersion(), '1.0.1', '<')) { $customerSetup = $this->customerSetup->create(['setup' => $setup]); $customerSetup->addAttribute( 'customer_address', 'street', [ 'type' => 'static', 'label' => 'Street Address', 'input' => 'multiline', 'backend' => \Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend::class, 'sort_order' => 70, 'multiline_count' => 4, 'validate_rules' => '{"max_text_length":255,"min_text_length":5}', 'position' …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.