我们如何在shopify中的settings_schema.json中设置min和max属性

问题描述 投票:0回答:1

我想在settings.schema.json文件中为输入字段添加最大字符值。但它告诉我错误:

错误:无效的块'slide':设置为id =“title_2”'max'不是有效属性

这是我的代码:

{
    "type": "text",
    "id": "title_2",
    "label": "Title 2",
    "placeholder": "Link Title",
"max":10
  },

max属性适用于Range类型。

"blocks": [
{
  "type": "slide",
  "name": "Press",
  "settings": [
  {
    "type": "product",
    "id": "press_product",
    "label": "Select Product"
  },
  {
    "type": "text",
    "id": "title_2",
    "label": "Title 2",
    "placeholder": "Link Title",
    "max":10
  },

...

请帮我解决这个问题。提前致谢。

javascript jquery shopify
1个回答
0
投票

字段没有max属性。

接受max的唯一字段是范围字段。

© www.soinside.com 2019 - 2024. All rights reserved.