This document will walk you through the process of adding validation to fields.
Fields are found on the Lead Gen Side of CAKE and allow you to build your posting doc for a specific Vertical or Offer.
Validation allows you to make certain fields required and validated according to your specifications in order for them to be posted into CAKE and in turn, accepted by your Buyers. Through Validation settings, you can also tell CAKE exactly what to do with these leads that do not meet your requirements.
Adding Validation to a Field
To add validation to a field:
- Open a Vertical Card
- Open the Fields tab
- Click on the hyperlinked Label (or name) of the field that you would like to add validation to
- Then click the 'Add' button
Validation Type
Next, select your Validation Type from the dropdown. The most common validator is “Required Field/Valid Format” which is why it's the first on the list. Another common validator is “Equals Value.”
Client Post Decision
This is specifically for Browser Posted leads, typically for someone who owns their landing page. The option you choose here will tell CAKE what to do with a lead that does not match the field validation you selected here. It is required regardless of whether you are actually receiving Browser Posted Leads.
You will have two options:
- Force Client Review: ONLY for AJAX posts, this requires validation on the physical form. If you select this option, a user will not be able to submit the form until they meet the validation type.
- Throw Out: If a lead that is browser posted in, does not meet the validators set for this field, CAKE will send the lead to the Scrub Queue.
Server Post Decision
This is specifically for Server Posted leads but again, it must be selected regardless of whether you're actually receiving Server Posted Leads. There is only one option for validation failures with Server Posts:
- Reject: If a lead that is server posted and does not meet the validators set for this field, CAKE will send the lead to the Scrub Queue.
Error Text: The “Error Text” box will be the message you want to show to your user when forcing client review, or to your Affiliate as to why this lead failed. By default, CAKE will send a general “error” message, but if you would like to customize that, you could do it here.
Compare Value: The “Compare Value” box will be used for certain validation types, such as “Equals Value” or “Contains Value.” The value posted into CAKE for this field will either need to equal or contain the value you specified here, or be the opposite if you checked the “Fail on Match” box next to it.
Copy Validation from Vertical: Another tool for Validation is the “Copy Validation from Vertical” button found on the top right of the Fields tab on the Vertical card. This will allow you to copy the Validators from any of your other verticals onto the one you are currently editing.