Skip to main content

Table of Contents

Validating user input and preventing invalid values


Only available versions of this content are shown in the dropdown

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

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 Model Property 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.

    For more information, see Property form - Completing the Advanced tab.

Did you find this content helpful?

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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