# New category name with a number in it returns "slug is invalid" but category is created anyway

**URL:** https://meta.discourse.org/t/new-category-name-with-a-number-in-it-returns-slug-is-invalid-but-category-is-created-anyway/37537
**Category:** UX
**Created:** [06.Январь.2016 15:40:47 UTC](https://meta.discourse.org/t/new-category-name-with-a-number-in-it-returns-slug-is-invalid-but-category-is-created-anyway/37537 "2016-01-06T15:40:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [06.Январь.2016 15:40:47 UTC](https://meta.discourse.org/t/new-category-name-with-a-number-in-it-returns-slug-is-invalid-but-category-is-created-anyway/37537/1 "2016-01-06T15:40:47Z")

</div>

Try to create a category with a name like this:

```
group 1 category

```

It should return an error message:

> Slug is invalid

However, the category was still created, with the slug `group-1-category`, so it must not have been invalid after all. Editing it and changing the name (not the slug) will also throw the error, but still apply the change.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [06.Январь.2016 22:40:35 UTC](https://meta.discourse.org/t/new-category-name-with-a-number-in-it-returns-slug-is-invalid-but-category-is-created-anyway/37537/2 "2016-01-06T22:40:35Z")

</div>

Something for your list @techapj?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [07.Январь.2016 06:46:05 UTC](https://meta.discourse.org/t/new-category-name-with-a-number-in-it-returns-slug-is-invalid-but-category-is-created-anyway/37537/3 "2016-01-07T06:46:05Z")

</div>

Fixed via

[https://github.com/discourse/discourse/commit/bfd21461dfd5881c6e9cad087bca7de1e30de94b](https://github.com/discourse/discourse/commit/bfd21461dfd5881c6e9cad087bca7de1e30de94b)

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [07.Январь.2016 06:46:09 UTC](https://meta.discourse.org/t/new-category-name-with-a-number-in-it-returns-slug-is-invalid-but-category-is-created-anyway/37537/4 "2016-01-07T06:46:09Z")

</div>


