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

Validation conflict with numeric properties

SA-20775

Summary



Number and Integer fields accept the letter E to support scientific notation.
Reference: 
https://pdn.pega.com/support-articles/number-presentation-format-accepts-character-ee

User wants to know how to  turnoff so the control only allows numbers?
Using edit-validate rules one can supply validations using regular expressions to only allow digits.

But if user simply type one or more e's in an input field you are still allowed to submit the form. Why?


Error Messages



Not applicable.


Steps to Reproduce



Put 'e' or 'E' in a number control.


Root Cause



A third-party product issue and not a Pega defect.

There is an inconsistency with how browsers behave with the current HTML5 number input type standard.
The same behavior can be witnessed outside of a Pega application.

Resolution



The explanation for the reported behavior is as follows:

In Chrome user is allowed to type 'E' and the + or - sign. All other characters are not allowed to even be typed in the field.
In IE 11, user can type anything into a number input field. But upon tab out or blur the browser will wipe out the field if it is not a valid number.
In Chrome it does not nullify the input field until one actually submits the form.

So in both cases, the reason why user is able to submit the form is because the edit-validate rules were not even invoked, and also because there were no values to even validate.

The browser itself wiped the values before Pega has a chance to perform any actions.

Published March 12, 2016 - 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