Support Article
Min or max character does not work for integer control
SA-27942
Summary
Developer need to restrict integer property, say for three digits. Mentioned minimum characters as 0 and maximum characters as 3 in presentation tab of the control. However, it is not restricting.
Error Messages
Not Applicable
Steps to Reproduce
1. Add a Number or Integer purpose specific control to a layout.
2. Specify a maximum number of characters (say 3).
3. Enter more than the maximum number of characters, that is, digits.
Actual Behavior: User can enter any number of digits in the field (set as Integer).
Expected Behavior: Entry of digits should be restricted to the number of max chars set for the Integer field.
2. Specify a maximum number of characters (say 3).
3. Enter more than the maximum number of characters, that is, digits.
Actual Behavior: User can enter any number of digits in the field (set as Integer).
Expected Behavior: Entry of digits should be restricted to the number of max chars set for the Integer field.
Root Cause
HTML5 does not support the maxlength of minlength attributes on Number type inputs. Internet Explorer goes beyond the HTML5 specification to enforce maxlength and minlength on Number inputs, while Firefox and Chrome browsers do not.
Resolution
This can be addressed by a local-change, for example:
Change the Editable Format Type to "Text" or by applying validation(say NonNegativeInteger) to the input field.
Published September 21, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.