🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Home Add-ons Cross-Field Validation Rules
Premium Integration

Gravity Forms
+ Cross-Field Validation Rules

Validation rules that compare Gravity Forms fields with each other or with a fixed value, so impossible answers are stopped before they reach you: a return date before the departure, an end time before the start, a maximum below the minimum, shares that do not add up to 100, a deposit larger than the total. Compare dates in every Gravity Forms date format, 12 and 24 hour times, date plus time, numbers, currency and order totals, and text, with offsets such as "at least 3 days later". Group rules check a sum, or that at least one, exactly one or all or none of a set of fields is filled in. Each rule has its own message on the field you choose and an optional condition. Rules are checked live in the browser and always again on the server, page by page on multi-page forms, and fields hidden by conditional logic are skipped. All processing is local, with no outside connection.

User User User User
+2k
4.9/5
Trusted by 2,000+ Agencies
Cross-Field Validation Rules

Watch it in action

Gravity Forms Cross-Field Validation Setup Guide: Compare Dates, Times, Numbers & Field Groups

Video setup guide: Gravity Forms Cross-Field Validation

Core Features

Validation Rules tab in each form's settings: add, edit, switch off and remove rules without code
Compare a field with another field, a fixed value, today or now, with an optional offset (+ days, hours, minutes or an amount)
Dates in every Gravity Forms format (m/d/y, d/m/y, y/m/d with slashes, dashes or dots; date picker, fields or drop-downs)
Times in 12 hour (AM/PM) and 24 hour format, and date + time from two fields
Numbers with a decimal dot or comma, currency fields, product price and quantity, and the order total
Operators: equal, not equal, greater / less (or equal), between, at least / at most N days, hours or minutes apart, same day
Text: same as, different from, contains, does not contain, with an ignore upper / lower case option
Group rules: the sum equals / is at most / is at least a value; at least one, exactly one, or all or none of the fields filled in
Your own error message on the field you choose, plus an optional condition (only check when ...)
Checked live in the browser for instant feedback, and always on the server so the rules cannot be skipped
Multi-page aware: each rule runs on the page that shows its error; fields hidden by conditional logic are skipped
Empty fields are skipped unless the rule says empty is an error. Local only, no outside connection. Gravity Forms 2.9+

What does it do?

Gravity Forms checks each field on its own: is it filled in, is it a valid date, is the number inside its range. What it cannot check out of the box is whether two answers make sense together. A visitor can pick a return date before the departure, an end time before the start time, a maximum budget below the minimum, percentages that add up to 94, or a deposit larger than the total. Each value is valid on its own, so the entry goes through and you find out later.

The Cross-Field Validation Rules add-on adds a Validation Rules tab to every form. A rule compares one field with another field, with a fixed value or with today or now, optionally with an offset such as plus 3 days or plus 30 minutes. It works with dates in every Gravity Forms date format, 12 and 24 hour times, a date plus a time from two fields, numbers, currency fields and the order total, and text. Group rules check that a set of fields adds up to a value, or that at least one, exactly one, or all or none of them are filled in.

Every rule has its own error message, shown on the field you choose, and can be limited by a condition such as only when Trip type is Return. Rules are checked live in the browser as visitors fill in the form, and always again on the server when the form is submitted, so a visitor who switches off scripts or posts the form directly is still stopped. On multi-page forms a rule runs on the page that shows its error, fields hidden by conditional logic are skipped, and empty fields are only an error when you say so. Everything runs on your own server, with no outside connection. For Gravity Forms 2.9 and newer.

How does it work?

Rules are stored with the form. When the form is shown, the add-on gives the browser the rules and a few facts about the fields they use (the date format, the time format, the decimal separator), and a small script checks each rule when a visitor changes or leaves one of its fields, and again before the visitor moves to the next page or submits. Every value is turned into something that can be compared: a date becomes a day number whatever its format, a time becomes minutes after midnight, a number is read with the decimal separator of the field or the Gravity Forms currency, and text can ignore upper and lower case. The same steps run on the server in the Gravity Forms gform_validation filter for every submission, so the result is the same in the browser and on the server, and the server decides. A rule is skipped when one of its fields is hidden by conditional logic, when its condition does not match, or when a compared field is empty and the rule does not say that empty is an error. On multi-page forms the server runs a rule on the page that shows its error and sends the visitor back to that page on the final submit. Everything happens on your own server — the add-on makes no outside HTTP request beyond the licence and update checks.

Interface Previews

Screenshot
Screenshot
Screenshot
Screenshot

How do I enable this?

1
Install and activate the add-on, then activate your license key in Forms → Settings → Validation Rules.
2
Open a form and go to Settings → Validation Rules. Press Add rule and choose what to compare: dates, times, numbers, text or a group of fields.
3
Pick the two fields (or a field and a fixed value), the comparison, the error message and the field that shows it. Add a condition if the rule only applies sometimes.
4
Save the rules and test the form: the message appears as soon as the answers do not fit, and the server refuses the submission until they do.

Customer Reviews

Submit your review
1
2
3
4
5
Submit
     
Cancel

Create your own review

GravityExtra
Average rating:  
 0 reviews

Have a new Feature idea?

Didn't see a feature in our plugin that you think would be useful? Share with us and let the team be a part of it.

Submit a Feature Request
$59
$39/year
You Save $20
Add any 2nd item, get 30% OFF both!
Use code GFEX30 at checkout
Secure checkout via Stripe
What's Included
  • Automatic Yearly Renewal
  • 1 Year Free Support & Updates (Renewable)
  • 24x7 Dedicated Customer Care
24/7 Support
For any query, connect with us on our support portal.
Submit a Query →
Quick Info
Version 1.0.0
Changelog
Icon
Gravity Forms Cross-Field Validation Rules
9 people are viewing this

Wait! Don't leave
empty-handed 🎁

Grab these exclusive codes to use at checkout!

10% OFF On all products
GFEX10
30% OFF Best Value
On any 2+ items
GFEX30

No thanks, I'll pay full price

Someone just bought this A few seconds ago
0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $49.00/yr
Bundle Special Price: $29.40/yr