Title: Validation Logic
Last modified: November 11, 2019

---

# Validation Logic

 *  Resolved [rtravers](https://wordpress.org/support/users/rtravers/)
 * (@rtravers)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/validation-logic-2/)
 * Hi,
 * I am looking to have 2-5 fields on a product validate with each other so that
   they don’t exceed a certain value when added together.
 * So as an example 3 fields have 3 different values , 60, 30 & 20, so when adding
   those values they don’t exceed 100 with an error showing up
 * I have been scouring around trying to find out anything but had no luck.
 * Any help with this would be very grateful

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [moomooagency](https://wordpress.org/support/users/moomooagency/)
 * (@moomooagency)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/validation-logic-2/#post-12120981)
 * Hi.
 * It is possible.
    You need to create NOV. For example: {uni_option_1}+{uni_option_2}
   +{uni_option_3}+{uni_option_4} etc Add conditional logic in the main formula 
   and check that NOV: if {uni_nov} > 100 set price 0 (In that case user won’t be
   able to add the product to the cart because the price is 0) And use Dynamic Notice
   option to show error message if {uni_nov} > 100
 * That’s all!
 *  Thread Starter [rtravers](https://wordpress.org/support/users/rtravers/)
 * (@rtravers)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/validation-logic-2/#post-12121428)
 * Thank you for that.
 * I had actually done it for the dynamic notice already. A good couple of hours
   after I posted this.
 * So not much to do to get it into the main formula.
 * Thank you for your help again.
 *  Plugin Author [moomooagency](https://wordpress.org/support/users/moomooagency/)
 * (@moomooagency)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/validation-logic-2/#post-12121605)
 * Great!
 * Would you please rate the plugin here on wp.org?
 *  Thread Starter [rtravers](https://wordpress.org/support/users/rtravers/)
 * (@rtravers)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/validation-logic-2/#post-12122270)
 * Already done so

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Validation Logic’ is closed to new replies.

 * ![](https://ps.w.org/uni-woo-custom-product-options/assets/icon-256x256.jpg?rev
   =1764217)
 * [Product Options and Price Calculation Formulas for WooCommerce – Uni CPO](https://wordpress.org/plugins/uni-woo-custom-product-options/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/uni-woo-custom-product-options/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/uni-woo-custom-product-options/)
 * [Active Topics](https://wordpress.org/support/plugin/uni-woo-custom-product-options/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/uni-woo-custom-product-options/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/uni-woo-custom-product-options/reviews/)

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 4 replies
 * 2 participants
 * Last reply from: [rtravers](https://wordpress.org/support/users/rtravers/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/validation-logic-2/#post-12122270)
 * Status: resolved