Uni CPO 4 Documentation
  • Introduction
  • Why Uni CPO?
  • Installation
    • Upgrade
  • How To Use
    • Plugin's Settings
    • Builder
      • Data Structure
      • General Settings
      • Non Option Variable (NOV)
      • Weight Conditional Logic
      • Dimensions Settings
      • Image Conditional Logic
      • Formula Conditional Logic
      • Dynamic labels for options/suboptions
      • Shipping Classes Conditional Logic
      • Cart Discounts
    • Basic Modules
      • Row
      • Column
      • Paragraph
      • Button
      • Image
    • Options
      • Text Input
      • Text Area
      • Select
      • Radio Inputs
      • Checkbox Inputs
      • Date Picker
      • File Upload
      • Dynamic Notice
      • Range Slider
      • Matrix
      • Extra Cart Button
      • Google Map
      • Distance by Postcode
      • Font Preview
    • Fields Conditional Logic
    • Validation Conditional Logic
    • Colorify Feature
    • Imagify Feature
    • "Free Sample" Feature
    • Arithmetic Operators
    • Manage Order Items
    • Suboptions export/import
  • For developers
    • Actions & Filters
    • JS events
    • Extending Uni CPO
  • Duplicating options and products
  • How to debug
  • Affiliation
  • Themes & Plugins Compatibility
    • Popup Maker How To
    • Boxtal
    • Pitchprint.com
    • NBDesigner
    • Toggle Tax For Woocommerce
  • FAQ
  • Refund Policy
  • Managing licenses and billing info
    • License Utilization
  • Uni CPO Add-ons
    • Custom dynamic SKU (paid)
      • Stock management based on dynamic SKU
    • "Send Inquiry" (free)
    • Hidden/disabled option (free)
Powered by GitBook
On this page

Was this helpful?

  1. How To Use

Validation Conditional Logic

PreviousFields Conditional LogicNextColorify Feature

Last updated 4 years ago

Was this helpful?

Validation Conditional Logic feature adds a possibility to dynamically apply different validation rules based on inputs/choices in other Options. This video will help to understand it better:

Currently, this feature works only for Option.

Example & tutorial of using validation conditional logic is shown here:

Validation attributes available

The following section is for advanced users only!

It is possible to use the following validation attributes:

  • type -email | number | integer | digits | alphanum | url

  • minlength - number

  • maxlength - number

  • min - number

  • max - number

  • range - example: [6, 10]

  • mincheck - number

  • maxcheck - number

  • equalto - ID of html form field

  • greaterorequalthan - ID of html form field

  • greaterthan - ID of html form field

  • lessorequalthan - ID of html form field

  • lessthan - ID of html form field

The attributes above should be prefixed by 'data-parsley-'. Examples:

data-parsley-type="email"
data-parsley-mincheck="3"
data-parsley-greaterthan="#uni_cpo_width-field"

The mentioned validation rules are usable in any option. They can be put inside "Extra valdiation rules" setting. Basically, this setting will output any HTML attribute (for instance, you would need placeholder attribute - it can be added here as well ;) ).

https://www.youtube.com/embed/WZgfxURHo1I
Text Input
https://moomoo.agency/create-product-like-on-blinds4udirect-co-uk-in-woocommerce-with-uni-cpo/