Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

additional question regarding validating numeric fields

Avatar

Former Community Member
This is part of the code i obtained in order to check validation.



//var reg = /^\d+$/; // checks whether input contains ONLY digits

var reg = /\d+/; // checks whether input contains digits AND letters



However, i found that both options checks only wether input contains letters.

What is the function that checks if input contains only digits ?
0 Replies