Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example: Visit date should be same or later than the registration date

For more examples, please refer to the wiki page Data Validation Examples

Expand
Code Block
languagejson
{
  "name" : "editChecks",
  "data" : {
    "constraints" : [ 
      {
        "records" : [ "cpr", "visit" ],
        "rules" : [
          {
            "expr" : "#cpr.registrationDate != null && #visit.visitDate != null && !#cpr.registrationDate.after(#visit.visitDate)",
            "description" : "Visit date should be same or later than the registration date!"
          } 
        ]
      }
    ]
  }
}

...