Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Validating user input and preventing invalid values

Updated on March 15, 2022

Ensure that only numbers can be entered for employee Social Security numbers.

Before you begin: Assume that in the Employee class, a property named SSN defines the employee’s Social Security number.
Do these steps to ensure that only numbers can be entered for the SSN property.
  1. In the navigation pane of Dev Studio, click App, and in the class field, enter Employee.
  2. In the navigation area for Employee, expand Data ModelProperty and click the SSN property.
  3. On the Advanced tab, enter the following values:
    1. To ensure that 9 characters must be entered for SSN values, enter 9 in the Max length and Expected length fields.
    2. To ensure that only numbers can be entered for SSN values, in the Use validate field, press the Down arrow key and click IsPositiveInteger. The IsPositiveInteger edit validate rule, which is part of Pega Platform, ensures that only positive integers can be entered. You can create additional edit validate rules for custom edit checks.

Have a question? Get answers now.

Visit the Support 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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us