# Validation Conditional Logic

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:

<https://www.youtube.com/embed/WZgfxURHo1I>

Currently, this feature works only for [Text Input](/uni-cpo-4-documentation/usage/options/text-input.md) Option.

**Example & tutorial of using validation conditional logic is shown here:** [**https://moomoo.agency/create-product-like-on-blinds4udirect-co-uk-in-woocommerce-with-uni-cpo/**](https://moomoo.agency/create-product-like-on-blinds4udirect-co-uk-in-woocommerce-with-uni-cpo/)

## Validation attributes available

**The following section is for advanced users only!**&#x20;

It is possible to use the following validation attributes:

* type -`email | number | integer | digits | alphanum | url`
* minlength - `number`&#x20;
* 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 ;) ).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.moomoo.agency/uni-cpo-4-documentation/usage/validation-conditional-logic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
