Major issue with Input Field - unity 5.3.6

Found a pretty major issue with input field.

  1. Create an input field with integer content type
  2. Set character limit to 4
  3. Using code, change inputField.text to a 4 digit number.

Result: the input field is set with the first 3 digits instead of 4 digits. It seems to be calculating the character limit incorrectly when defining the number from code.

Why is this a major issue?
Player inserts a 4 digit number, which is allowed because it is under the character limit, and the UI allows it. Then he closes the dialog and the game saves the number. Later he opens the dialog again, and we want to show him the number he entered. To do that we set the value from code, however one digit gets cut out!

So basically this means you can’t have reliable persistence of any kind on an input field with limited characters.

While I never experienced this problem myself, I thought I saw it reported that it was fixed.
Yep, fixed in 5.4

[793119] UI: Fixed off-by-1 error in InputField.characterLimit when ContentType != standard.