{"section":"known-issues","requestedLocale":"en","requestedSlug":"attachment-update-and-create-api-validation-on-field-domainvalues-not-working","locale":"en","slug":"attachment-update-and-create-api-validation-on-field-domainvalues-not-working","path":"docs/en/known-issues/Catalog/attachment-update-and-create-api-validation-on-field-domainvalues-not-working.md","branch":"main","content":"## Summary\n\n\nVia UI (directly on VTEX admin) is possible to create an attachment without the field **Permitted values** filled:\n ![](https://vtexhelp.zendesk.com/attachments/token/8rFw6593yoVr64CViajezsXW0/?name=image.png)\n\nHowever, via API there is this validation for this field:\n\n    <Error> <Message>DomainValues in Domain at position 0 can not be null or empty value</Message></Error>\n\n\nMeaning you can't create a attachment like this:\n\n    \\{ \"Id\": 6, \"Name\": \"Test\", \"IsRequired\": false, \"IsActive\": true, \"Domains\": [     \\{          \"FieldName\": \"test\",          \"MaxCaracters\": \"20\",          \"DomainValues\": \"\"      \\}  ]\\}\n\n\n\n\n#### Simulation\n\n\n\n1. Use the following API: https://developers.vtex.com/docs/api-reference/catalog-api#post-/api/catalog/pvt/attachment\n2. Try to leave it empty the field DomainValues\n3. Check that the error message mentioned above is returned.\n\n\n#### Workaround\n\n\nCreate the attachment via Admin."}