Conditions

Conditions for Actions.

Condition

JavaScript

class Condition()

Condition interface.

Condition.validate(form)

Return true if this condition passes on this form.

Arguments:
  • formForm() object to execute on.

Python

class facond.conditions.Condition[source]

Base condition.

validate(form)[source]

Return True if the form passes this condition.

ValueIs

JavaScript

class ValueIs(field, value)

Validate if a field has a given value.

Arguments:
  • field – Name of the field to test.
  • value – Value to test.
ValueIs.validate(form)

Return true if the field’s value is this.value

Python

class facond.conditions.ValueIs(field, value)[source]

Rule that passes if a field has an arbitrary value.

validate(form)[source]

Return True if the form field has the given value.