Support Article
Issue with integer validation
SA-86435
Summary
Integer data type accepts decimal values. Integer must accept only the whole numbers and not the decimal values.
Error Messages
Not Applicable
Steps to Reproduce
- Create an Integer property
- Use the property in the Text input control which is added to a section
- Set Editable Type to Number on the Presentation tab of the Text input control
- Run the section
- Verify if the decimal values are accepted
Root Cause
An issue with the browser. If an input field (type=number) is entered with a string that contains more than one dot, then the browser does not submit the value. Hence, it cannot be validated by the platform as there is no value in the field. If the field is marked as Required and the user enters 1..1, then value cannot be blank message displays.
Resolution
Here’s the explanation for the reported behavior:
A custom JS validation, as mentioned for min max, is required as the field cannot be marked required.
Perform the following local-change:
- Use Text Type and limit the entered signs with custom JS
- Use Number Type and limit length and dots with a custom JS
Published October 17, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.