Skip to content

Conditions

Conditional Rendering

vue
<!--  Equal -->
<VsFormText :conditions="[['newsletter', '==', true]]"/>

<!--  in -->
<TextElement name="phone" :conditions="[['delivery', ['ups', 'fedex']]]" />
json
{
    "schema":{
        "text":{
            "conditions": ["newsletter", "==", true]
        }
    }
}

Operator

  • == - expect equality
  • != - expect inequality
  • >- expect the other element's value(s) to be higher
  • >= - expect the other element's value(s) to be higher or equal
  • < - expect the other element's value(s) to be lower
  • <= - expect the other element's value(s) to be lower or equal
  • between - expect the other element's value(s) to be between two numbers ([x, y])
  • ^ - expect the other element's value to start with
  • $ - expect the other element's value to end with
  • * - expect the other element's value to contain
  • in - expect to be among an array of values
  • not_in - expect not to be among an array of values