+ Start a Discussion
Silkcutz01Silkcutz01 

Validations in Visual Workflow

To prevent my Flows failing in writing back to SFC objects I need to ensure some fundamental validations are taken care of:

 

  1. Field inputs do not exceed the maximum number of characters set within the SFC Object. 
  2. Email addresses are formatted correctly.

Without these validations in place the Flow fails when these conditions are not met.

 

I do not have any experience of creating regex validation rules so would be grateful for anyone's advice here.

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
RajaramRajaram
Validation rules in flow reuse salesforce formulas. so for things like as max characters you can use existing functions such as LEN.
For email address here is the salesforce formula you can use:

REGEX({!Email_Address},"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}")

Note that the screen input field here has the unique name Email_Address.

Hope this helps..