How do I only accept valid responses in my form fields?

Modified on Wed, 30 Oct at 8:20 AM

Validate Logic helps you control when and how fields in your form need to be filled out. By default, all fields are required, but with Validate Logic, you can add conditions, making fields optional or ensuring they meet certain requirements.

Validate Logic allows you to control when a field in your form needs to be filled out a certain way — not just that they have a value, but that the value matches certain rules (logic) that you have added.

Example

Imagine you have a student ID number field on a staff form. You might want to make sure this field only accepts a certain number of digits, like exactly 6 characters for a valid ID. Or, for an expense report field, you may want to ensure that the number entered doesn’t exceed a specific limit, like $5,000.

The Easiest Way: Use Droplet AI

The easiest way to configure Validate Logic on your form fields is to use Droplet AI to write an expression for you!


Here's how:


1

In the Form Editor, select a component and click Validate Logic from the properties panel.

2

In the top pink bar, type the validation conditions you would like to apply to this field in plain wording, for example: "must be less than $200."

3

Press enter and await a response from Droplet AI.  Accept its recommendation by clicking the Accept icon or by pressing Done.

4

Test your field to ensure it is adhering to the new Validate Logic you have added to it by Previewing/Debugging the form.


Droplet AI will be using some functions to write Validate Logic for you.  If you'd like to know more about what it is writing or how you can write your own logic, keep reading about helper functions below.


Write Validate Logic with Helper Functions

Droplet has a variety of shortcuts (called Helper Functions) to make writing Validate Logic easier.  Think of them like Google Sheets or Excel functions. We have a full guide of our helper functions at the link below:

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article