api icon indicating copy to clipboard operation
api copied to clipboard

Improve documentation for field validation regex in API

Open jean-luc opened this issue 7 years ago • 0 comments

A couple of things I noticed when referring to the documentation for field validation regex in API https://docs.dadi.cloud/api/6.1

1. Missing quotes in regex example

In the documentation for Collection Fields https://docs.dadi.cloud/api/6.1#collection-fields the table shows an example for validation.regex. This is missing quotes around the regex pattern value.

{ "pattern": /[A-Z]*/ } should be { "pattern": "/[A-Z]*/" }

2. Missing documentation for flags property

There is no documentation for the validation.regex.flags property.

  "regex": {
    "pattern": "....",
    "flags": "i"
  }
}

jean-luc avatar Dec 03 '18 13:12 jean-luc