What is the meaning of the validation error "[400] ValidationError: 'fields.slug' invalid input" when trying to create a new item in Webflow?

Published on
September 22, 2023

The validation error "[400] ValidationError: 'fields.slug' invalid input" in Webflow typically occurs when there is an issue with the 'slug' field of a new item being created. The 'slug' is an automatically generated URL-friendly version of a title or other text field in Webflow. It is used to create the URL for each item, making it important for SEO and user-friendly navigation.

Here are some possible reasons and solutions for this validation error:

  1. Restricted characters: The 'slug' field may contain restricted characters that are not allowed in URLs. This can include special characters like "&", "#", or "%". To fix this error, remove any restricted characters from the 'slug' field and replace them with appropriate alternatives. For example, the "&" character can be replaced with "and", or "#" can be replaced with "number".

  2. Duplicate slugs: Each 'slug' must be unique within a Webflow project. If you are trying to create a new item with a 'slug' that already exists, this error will occur. To resolve this, either modify the 'slug' to make it unique or change the 'slug' of the existing item to something else.

  3. Slug length: Webflow has a maximum length limit for slugs to prevent excessively long URLs. If the 'slug' field exceeds this limit, the validation error will be triggered. Ensure that the 'slug' field does not exceed the specified character limit.

  4. Reserved slugs: Webflow reserves certain slugs for its internal use, such as "/404". If you are trying to use a reserved slug, you will receive the validation error. Change the 'slug' to something that is not reserved by Webflow.

  5. Backend issue: In some cases, this error may be caused by a temporary backend issue on the Webflow servers. If you have confirmed that there are no issues with the slug and it still occurs, you can reach out to the Webflow support team for assistance.

Additional Questions:

  1. Why are slugs important in Webflow?
  2. How can I optimize the slugs for SEO in Webflow?
  3. Can I customize the automatic slug generation in Webflow?