Skip to content

Data Validation

mapoart edited this page Apr 29, 2021 · 11 revisions

Nexss Programmer passing data between programs and modules/packages in JSON format. Each module can receive and send messages to another one. You can validate data by setup project and use config file as below.

See available validation possibilities by command nexss -dev-validation. works only from 2.1.1+

Below example will validate module that needs to have 2 required fields:

-input: called 'file'
-output: called 'file'

name: Email
debug: true
input:
  - name: _imap_username
    validate:
      - type: required
        message: You need to pass <Field> parameter for safety reason. # <Field> will be replaced by fieldname
  - name: _imap_password
    validate:
      - type: required

output:
  - name: emailTotal
    validate:
      - type: number

Example of Validated Data

image

Clone this wiki locally