# Max length for real name field?

**URL:** https://meta.discourse.org/t/max-length-for-real-name-field/140333
**Category:** Support
**Created:** [January 31, 2020, 7:12pm UTC](https://meta.discourse.org/t/max-length-for-real-name-field/140333 "2020-01-31T19:12:29Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Queth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/queth/32/154753_2.png) [@Queth](https://meta.discourse.org/u/Queth)
#### Post date: [January 31, 2020, 7:12pm UTC](https://meta.discourse.org/t/max-length-for-real-name-field/140333/1 "2020-01-31T19:12:29Z")

</div>

Hello, I wonder wether it’s possible to set a max length on real names? There is one for usernames, but not for real names. (Or did I miss it?)

When they are displayed in posts this could be very long, especially when someone has a title also.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [January 31, 2020, 10:23pm UTC](https://meta.discourse.org/t/max-length-for-real-name-field/140333/3 "2020-01-31T22:23:46Z")

</div>

There is no max length setting for real names that I am aware of. If a user tries to enter a name that is longer than 200 characters it will produce an internal server error. Very long names get truncated in the UI, so they don’t break the layout.

It might be a good idea to have a `name length` setting.

Setting a name to longer than 200 characters should give the user a proper error message instead of the current “500 Internal Server Error” message.

---

<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: [February 1, 2020, 3:04am UTC](https://meta.discourse.org/t/max-length-for-real-name-field/140333/4 "2020-02-01T03:04:25Z")

</div>

Should we add rudimentary protection for this @eviltrout?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [February 3, 2020, 7:15pm UTC](https://meta.discourse.org/t/max-length-for-real-name-field/140333/5 "2020-02-03T19:15:20Z")

</div>

That’s an interesting error message. This fixes it and makes it work a lot more nicely:

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

---

<div class="post-metadata">

### Author: ![Queth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/queth/32/154753_2.png) [@Queth](https://meta.discourse.org/u/Queth)
#### Post date: [February 3, 2020, 8:26pm UTC](https://meta.discourse.org/t/max-length-for-real-name-field/140333/6 "2020-02-03T20:26:26Z")

</div>

Thank you for adding this! Would it also be possible to set the maxlength in the admin cp just like with the username?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [February 3, 2020, 8:42pm UTC](https://meta.discourse.org/t/max-length-for-real-name-field/140333/7 "2020-02-03T20:42:57Z")

</div>

Not at this time. I recommend enforcing it on your forums by contacting users who use very long names and asking them to change them.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 27, 2023, 6:30am UTC](https://meta.discourse.org/t/max-length-for-real-name-field/140333/8 "2023-12-27T06:30:21Z")

</div>


