Blog

How to validate user properties with regular expressions

by on April 23, 2015

When a user registers or updates their account, your application uses the user registration API. It is common for the user interface to enforce the data entry rules and validate the values entered by the user. However, an alternative approach is to perform data validation on the server. Backendless supports user property validation when creating and updating user objects using regular expressions.

Backendless Console includes several pre-configured regular expressions (regex) for the most common data types, such as email address, URL, social security number, and US phone number. Additionally, you can specify your own regex. To configure a validator for a user property:

  1. Login to Backendless Console, select an app and click the Users icon.
  2. The User Properties section includes the validator “column”. Select one of the pre-configured validators from the drop-down list or choose custom and enter your own regex:

Leave a Reply