Numerical textbox unable to set max characters

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

I have created a numerical text box in Desktop platform with max characters of 30, but when i take a build the max character exceeds. It is only happen in numerical text box. Someone can help me for this issue.

Hi,

It is not a kony product issue, but rather a native limitation. Please find our observation as below,

When "textInputMode" mode is set to TEXTBOX_INPUT_MODE_NUMERIC, we are able to enter more than the digits as limited in "max character" property. This behavior can observed in SPA iPhone, SPA iPad, Desktop Web platforms.

For a textbox, when "textInputMode" is number, it is not working even in the native application. please check the below link

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_maxlength

modify input type="number", to check native behavior

Note : When "textInputMode" mode is set to TEXTBOX_INPUT_MODE_ANY, It will restrict the character as limited in "max character" property.

#Workaround#

onTextChange of textBox widget, you need to give write custom js logic to restrict the max length.

workaround method will done thankyou

Hello,

Thank you for the update, did my response help you? If yes, make sure you click [Select as Best] under the response to close out the post.

on key down method its working

I set max characters property of a Textbox to 18 for the iOS version. I'm not able to input more than 18 but if I try to use textbook.text property to assign a string larger than 18 characters it allows all, doesn't restrict/trim down to 18. Is this a expected behaviour ?

On Android the above issue doesn't exist, it automatically trims down to 18, the defined character limit.

Hi @Soniv Mvthis​

This need to be validate, if you are setting the text at run time and its allowing more than max character and there is platform inconsistency. Please specify your version details.

Visualizer 7.2.1