タグ付けされた質問 「custom-validation」

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' …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.