diff --git a/packages/ui-extensions/docs/surfaces/checkout/staticPages/configuration.doc.ts b/packages/ui-extensions/docs/surfaces/checkout/staticPages/configuration.doc.ts index e1699f5da..f201eff32 100644 --- a/packages/ui-extensions/docs/surfaces/checkout/staticPages/configuration.doc.ts +++ b/packages/ui-extensions/docs/surfaces/checkout/staticPages/configuration.doc.ts @@ -434,7 +434,7 @@ You retrieve these metafields in your extension by reading [\`appMetafields\`](/ { title: 'Validation options', sectionContent: - 'Each setting can include validation options. Validation options enable you to apply additional constraints to the data that a setting can store, such as a minimum or maximum value, or a regular expression. The setting\'s `type` determines the available validation options. \n\n You can include a validation option for a setting using the validation `name` and a corresponding `value`. The appropriate value depends on the setting type to which the validation applies.\n\n The following table outlines the available validation options with supported types for applying constraints to a setting:\n\n | Validation option | Description | Supported types | Example |\n|---|---|---|---|\n| Minimum length | The minimum length of a text value. |
single_line_text_field
multi_line_text_field
[[extensions.settings.fields.validations]]|\n| Maximum length | The maximum length of a text value. |
name = "min"
value = "8"
single_line_text_field
multi_line_text_field
[[extensions.settings.fields.validations]]|\n| Regular expression | A regular expression. Shopify supports [RE2](https://github.com/google/re2/wiki/Syntax). |
name = "max"
value = "25"
single_line_text_field
multi_line_text_field
[[extensions.settings.fields.validations]]|\n| Choices | A list of up to 128 predefined options that limits the values allowed for the metafield. | `single_line_text_field` |
name = "regex"
value = "(@)(.+)$"
[[extensions.settings.fields.validations]]|\n| Minimum date | The minimum date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. | `date` |
name = "choices"
value = "["red", "green", "blue"]"
[[extensions.settings.fields.validations]]|\n| Maximum date | The maximum date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. | `date` |
name = "min"
value = "2022-01-01"
[[extensions.settings.fields.validations]]|\n| Minimum datetime | The minimum date and time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. | `date_time` |
name = "max"
value = "2022-03-03"
[[extensions.settings.fields.validations]]|\n| Maximum datetime | The maximum date and time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. | `date_time` |
name = "min"
value = "2022-03-03T16:30:00"
[[extensions.settings.fields.validations]]|\n| Minimum integer | The minimum integer number. | `number_integer` |
name = "max"
value = "2022-03-03T17:30:00"
[[extensions.settings.fields.validations]]|\n| Maximum integer | The maximum integer number. | `number_integer` |
name = "min"
value = "9"
[[extensions.settings.fields.validations]]|\n| Minimum decimal | The minimum decimal number. | `number_decimal` |
name = "max"
value = "15"
[[extensions.settings.fields.validations]]|\n| Maximum decimal | The maximum decimal number. | `number_decimal` |
name = "min"
value = "0.5"
[[extensions.settings.fields.validations]]|\n| Maximum precision | The maximum number of decimal places to store for a decimal number. | `number_decimal` |
name = "max"
value = "1.99"
[[extensions.settings.fields.validations]]|', + 'Each setting can include validation options. Validation options enable you to apply additional constraints to the data that a setting can store, such as a minimum or maximum value, or a regular expression. The setting\'s `type` determines the available validation options. \n\n You can include a validation option for a setting using the validation `name` and a corresponding `value`. The appropriate value depends on the setting type to which the validation applies.\n\n The following table outlines the available validation options with supported types for applying constraints to a setting:\n\n | Validation option | Description | Supported types | Example |\n|---|---|---|---|\n| Minimum length | The minimum length of a text value. |
name = "max_precision"
value = "2"
single_line_text_field
multi_line_text_field
[[extensions.settings.fields.validations]]|\n| Maximum length | The maximum length of a text value. |
name = "min"
value = "8"
single_line_text_field
multi_line_text_field
[[extensions.settings.fields.validations]]|\n| Regular expression | A regular expression. Shopify supports [RE2](https://github.com/google/re2/wiki/Syntax). |
name = "max"
value = "25"
single_line_text_field
multi_line_text_field
[[extensions.settings.fields.validations]]|\n| Choices | A list of up to 128 predefined options that limits the values allowed for the metafield. | `single_line_text_field` |
name = "regex"
value = "(@)(.+)$"
[[extensions.settings.fields.validations]]|\n| Minimum date | The minimum date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. | `date` |
name = "choices"
value = "[\\\\"red\\\\", \\\\"green\\\\", \\\\"blue\\\\"]"
[[extensions.settings.fields.validations]]|\n| Maximum date | The maximum date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. | `date` |
name = "min"
value = "2022-01-01"
[[extensions.settings.fields.validations]]|\n| Minimum datetime | The minimum date and time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. | `date_time` |
name = "max"
value = "2022-03-03"
[[extensions.settings.fields.validations]]|\n| Maximum datetime | The maximum date and time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. | `date_time` |
name = "min"
value = "2022-03-03T16:30:00"
[[extensions.settings.fields.validations]]|\n| Minimum integer | The minimum integer number. | `number_integer` |
name = "max"
value = "2022-03-03T17:30:00"
[[extensions.settings.fields.validations]]|\n| Maximum integer | The maximum integer number. | `number_integer` |
name = "min"
value = "9"
[[extensions.settings.fields.validations]]|\n| Minimum decimal | The minimum decimal number. | `number_decimal` |
name = "max"
value = "15"
[[extensions.settings.fields.validations]]|\n| Maximum decimal | The maximum decimal number. | `number_decimal` |
name = "min"
value = "0.5"
[[extensions.settings.fields.validations]]|\n| Maximum precision | The maximum number of decimal places to store for a decimal number. | `number_decimal` |
name = "max"
value = "1.99"
[[extensions.settings.fields.validations]]|', }, ], },
name = "max_precision"
value = "2"