# userName field length validation counts byte length instead character length

**URL:** <https://devforum.zoom.us/t/username-field-length-validation-counts-byte-length-instead-character-length/45093>\
**Category:** Web\
**Created:** [March 7, 2021, 6:35pm UTC](https://devforum.zoom.us/t/username-field-length-validation-counts-byte-length-instead-character-length/45093 "2021-03-07T18:35:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.yovchev](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/m.yovchev/32/24165_2.png) [@m.yovchev](https://devforum.zoom.us/u/m.yovchev)\
**Post date:** [March 7, 2021, 6:35pm UTC](https://devforum.zoom.us/t/username-field-length-validation-counts-byte-length-instead-character-length/45093/1 "2021-03-07T18:35:31Z")

</div>

**Description**  
When sending information to the web sdk client (configuration fields), the validation (probably on server side) counts “userName” value as bytes and not as characters. This might apply to other fields as well, only userName is tested.

In my tests the userName value I’m sending to the client is Cyrillic and has 59 multbyte characters. PHP strlen() for example reports 110 length (but it shouldn’t be confused with character length) while JS `length` property reports the character counts 59.

**Error**  
[4003] userName length \> 100 or userName is empty

**Which Client Web SDK version?**  
Tested in 1.9.0 and latest 1.8.x

**To Reproduce(If applicable)**  
Set userName to “Психолог, Психотерапевт, Личен и Бизнес Коуч Ирина Ставрева”

**Screenshots**  
n/a

**Device (please complete the following information):**

- Device: any
- OS: any
- Browser: any
- Browser Version any

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 8, 2021, 8:03pm UTC](https://devforum.zoom.us/t/username-field-length-validation-counts-byte-length-instead-character-length/45093/2 "2021-03-08T20:03:19Z")

</div>

Hey @m.yovchev ,

Thanks for reporting this issue to us. We will take a look at this and come up with a solution. (CS-3138)

Stay tuned! 🙂

-Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [April 8, 2021, 6:03am UTC](https://devforum.zoom.us/t/username-field-length-validation-counts-byte-length-instead-character-length/45093/3 "2021-04-08T06:03:34Z")

</div>

Closed on April 8, 2021, 6:03am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
