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:
In the Form Editor, select a component and click Validate Logic from the properties panel.
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."
Press enter and await a response from Droplet AI. Accept its recommendation by clicking the Accept icon or by pressing Done.
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
Feedback sent
We appreciate your effort and will try to fix the article