# Validation Settings API This API is available to Validation Settings extensions. Refer to the [tutorial](https://shopify.dev/docs/apps/checkout/validation/create-complex-validation-rules) for more information. Note that the [`FunctionSettings`](https://shopify.dev/docs/api/admin-extensions/components/forms/functionsettings) component is required to build Validation Settings extensions. ## applyMetafieldChange Applies a change to the validation settings. ### ApplyMetafieldChange #### Returns: Promise #### Params: - change: MetafieldChange export type ApplyMetafieldChange = ( change: MetafieldChange, ) => Promise; ### MetafieldUpdateChange ### key value: `string` ### namespace value: `string` ### type value: `"updateMetafield"` ### value value: `string | number` ### valueType value: `SupportedDefinitionType` ### MetafieldRemoveChange ### key value: `string` ### namespace value: `string` ### type value: `"removeMetafield"` ### MetafieldChangeSuccess ### type value: `"success"` ### MetafieldChangeResultError ### message value: `string` ### type value: `"error"` ## data The object that exposes the validation with its settings. ### ValidationData The object that exposes the validation with its settings. ### shopifyFunction value: `ShopifyFunction` ### validation value: `Validation` ### ShopifyFunction ### id value: `string` the validation function's unique identifier ### Validation ### id value: `string` the validation's gid when active in a shop ### metafields value: `Metafield[]` the metafields owned by the validation ### Metafield ### description value: `string` ### id value: `string` ### key value: `string` ### namespace value: `string` ### type value: `string` ### value value: `string`