Skip to main content

Validating user input and preventing invalid values

Suggest edit
Updated on June 30, 2021

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.
Did you find this content helpful? YesNo

Have a question? Get answers now.

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

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