Skip to content

Function validation

Custom JavaScript or Python validation function (returns row if valid, null if invalid).

Parameters

  • language (Language, string, optional) — JavaScript or Python. Omitted language is JavaScript. Switching does not translate source. Allowed values: javascript, python.
  • function (string, required) — JavaScript or Python function code. Default: "".

Field selection

  • params.source — Field whose values this operation reads. Use a single field name, a comma-separated list of plain field paths (cash_flow_type, currency) from the multi-select UI, or a regex via Pattern mode. Omit to apply to all fields on the row.
  • params.target — Optional output field. When omitted, the source field is updated in place. Hidden when more than one named source field is selected.

JSON Configuration

{
"id": "op-function",
"kind": "validation:function",
"params": {
"language": "javascript",
"function": "(cellValue, { row }) =>\n row.status === \"active\" ? row : null"
}
}

Write Python with params.language set to python. Use def validate(cell_value, ctx):. Return True or the same ctx["row"] object to pass; return {"columnId": …, "message": …} to fail with that message. Stdlib plus from fontana import Currency. Import pandas when the function uses it.