Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Incorrect error message displays for value in numeric field

SA-67074

Summary



Incorrect error message 'Value cannot be blank' displays on entering 12345678990123e4 in the number field. This error displays for 'e' (in the value entered) which is an incorrect character for the numeric field.


Error Messages



Value cannot be blank


Steps to Reproduce

  1. Create a Text input which is configured with Number.
  2. Set Required as Always.
  3. Enter 123e in the numeric field and focus out. Incorrect error message displays. 
  4. Enter 123 in the field and focus out. User can proceed further in the flow.


Root Cause



A third-party product issue: Browser behavior.


Resolution



Perform the following local-change:

Save As the below script as an HTML file and run it in different browsers:


<!DOCTYPE html>
<html lang="en">
<head>
    <title>Client 1</title>
    <script>
      function alertValue(e){
          alert(e.target.value);
      } 

    </script>
</head>
<body>
<span > Please enter a value </span>
<input id="NumberProp"  type="number"  onchange="alertValue(event)" />
</body>
</html>


In the Internet Explorer browser:

The Internet Explorer browser does not restrict alphabets in numbers. Hence, it alerts the value. As the type is number, the input value is validated accordingly and the error message '123er is not a valid integer value' displays. 
This is an issue with the browser and not an issue with the Pega application.


In Chrome and Firefox browsers:  On entering '123' and tabbing out of the number field, '123' displays in the alert box. However, on entering '123e' and tabbing out, the browser returns an empty value. Pega displays the 'Value cannot be blank' error message accordingly. 
 

Published March 22, 2019 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us