Create Validations

Life is so much better when you get an instant advice to solve your problem as you are facing it. This is precisely what Apty's on-screen Validation accomplishes. For example, validating the correct format for your email address or phone number.

In this article, we will learn how to create a Validation while generating a New Lead on Salesforce.

Use the following steps to create a Validation,

1.  Login to the Apty Studio after launching it on your web browser.

2.  Click Select Application.

3.  Choose SFL from the list of applications to launch Salesforce in your browser.

Note:

  • Ensure that you have added your applications to the Admin Portal before creating any content on it. 
  • SFL is a default keyword created during the process of adding Salesforce to the Admin Portal.

4.  On the Salesforce application, navigate to the New Lead section and then click Validations on the Apty Studio.

Note:

  • You can create Apty content only if the application is connected with the Apty Studio. A well connected application is indicated by a green color icon.               

5.  Select a Frame to start creating Launchers on your application page.

Note:

  • Each page in your application must have a unique Frame connected with the Apty Studio to create Apty Content like ValidationsLaunchersTooltips, and Announcements.                                                        
  • The Validations screen will prompt you to create a new Frame, unless it was created earlier, in which case Apty Studio will connect to one automatically. You can also choose a different Frame from the list of Frames that are already on the page. To understand the importance of Frames in the creation of Apty Content, see What are Frames.

6.  Click the + icon or Create New Validation button to start creating Validations.

 

7.  Click Select Spotlight and then hover you cursor over the element you want to select.

 

Note:

Element Selection is a default selector when the user creates a new Validation. However, you can choose one of the advanced selectors from the drop-down.

Element Selectors

Description

Element Selection

The Element Selection selector captures a web element on your application while creating Validations. Apty Studio captures the element which enables the Validation to appear directly next to the selected element.

Custom Script

You can identify an element using it's Custom Script which consists of attributes such as class, id, placeholder, etc. This option can be used in scenarios when there are a list of elements displayed together in some pattern on your application and you want your Validation to precisely point to only one of them. For example, selecting an element in a dropdown menu.

CSS Selector

The CSS Selector option is used to identify an element by it's unique id or class name. This ensures that the selector is accurate and unique to the element attached to it.

XPath

To increase accuracy, provide high-quality statistics, and speed up application performance, the XPath records and maintains the entire attribute path connected to an element on your application.

8.  Click the Email input field on the New Lead form to create an email Validation.

 

9.  In the Apty Studio, enter your Validation Name.

 

Note:

A default Validation name will be assigned based on the element you select. However, you can modify the name according to your requirements.

10. Under VALIDATORS, click the +Add Validator button to add a condition.

 

11. Select Regular expression from the dropdown.

 

Note:

To learn more about different validation conditions, see Advanced Conditions for Validations.

12. Add the regular expression as shown below to authenticate the user's email id and then include an error message for when a user submits an incorrect email id.

^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$

 

13. Select a position for your Validation icon to appear on your application.

 

Tip:

You can also customize your Validation Icon offset and choose to show or hide the icon.

14. Select your Validation theme and appearance from the dropdown.

 

Note:

By default three theme options are provided for Apty Validations:

  • Default
  • Apty Light
  • Apty Dark

To learn how to create new themes, see Themes (Version 4.x).

15. Click Save.

Once you create a Validation, you can make it accessible for your end users by publishing it either through the Admin Portal or the Apty Studio.

For more information, see Publishing Apty Content(version 4.x or above).

Note:

  • You can also add advanced customization to your Validations like adding Segments, enabling the Disable DOM elements functionality, and scheduling the timezone and date for your Validations.