Step-By-Step Guide to Use Regex Validator to Validate Email IdLet's see an example of validating an E-mail Id. To validate the E-mail Id: 1. Create a new process. 2. From the Canvas Tools panel, add the Regex Validator to the Flowchart designer on the Canvas.
3. In the Parameter bar, create an In argument, EmailInput of type String and an Out argument, ValidationResult of type Boolean. These arguments are used to pass the required E-mail Id as input and store the result of validation respectively.
4. Click
the 5. Click Add to set the validator mapping. 6. In the Arguments/Variables drop down list, select EmailInput argument defined above. 7. From the Validator Type drop down list, select EmailID.
8. Click CONFIRM. 9. In the Output Mapping list, select ValidationResult argument defined above.
10. Add a WriteLine activity and in the Text field, enter ValidationResult to store the result of validation perfomed on the specified E-mail Id. Below is the sample automation process workflow created:
11. Save the process. 12. Setup the environment and then perform test run.
The Output console of automation Studio displays the validation result. Observe that the validation result received is False as the specified E-mail ID is not in the expected format. You can use the validation result to take appropriate action to perform the subsequent action such as display a message for the user to re-enter the E-mail Id in correct format. |
Related Topics |