Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Licenses

COMMUNITY, ENTERPRISE, CORPORATE

Since

VERSION 6.0

It is also possible to define validation rules for fields inside a JSON Schema document.

Note: Currently, validation rules placed in the JSON Schema are not reflected automatically in the form. In order to validate the fields in a form, you have to use the layout section in the form configuration to define form rules. See Form - Validation

This will change in a future version of PIPEFORCE, so that validation rules in the JSON Schema will be converted automatically to form validation rules. You can vote for this feature by adding a comment to this page, if you want. The more votes, the higher priotized this feature gets.

For a full documentation about the possible validation rules in JSON Schema, see the specification: https://json-schema.org/draft/2019-09/json-schema-core.html
https://json-schema.org/understanding-json-schema/

Here are some example validation rules.

Length

{
  "type": "string",
  "minLength": 2,
  "maxLength": 3
}

Valid: hi

Regular expression

{
   "type": "string",
   "pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$"
}

Valid: 555-1212

Date and time

{
   "type": "string",
   "format": "date-time"
}

Valid: 2018-11-13T20:20:39+00:00

Time (draft)

{
   "type": "string",
   "format": "time"
}

Valid: 20:20:39+00:00

Date (draft)

{
   "type": "string",
   "format": "date"
}

Valid: 2018-11-13

Email

{
   "type": "string",
   "format": "email"
}

Valid: my@email.de

Hostname

{
   "type": "string",
   "format": "hostname"
}

Valid: google.com

Uri

{
   "type": "string",
   "format": "uri"
}

Valid: https://google.com

Required fields

{
  "type": "object",
  "properties": {
    "name":      { "type": "string" },
    "email":     { "type": "string" },
    "address":   { "type": "string" },
    "telephone": { "type": "string" }
  },
  "required": ["name", "email"]
}

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.