Skip to content

Commit cb36ffa

Browse files
committed
modified notes
1 parent bd3a692 commit cb36ffa

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

docs/explanations/curator_data_model.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,13 @@ JSON Schema output:
195195

196196
### Format
197197

198-
The format of this attribute. See [format](https://json-schema.org/understanding-json-schema/reference/type#format) The type of this attribute must be "string" or "string_list". The value of this column will appear as the `format` of this attribute in the JSON Schema. Must be one of:
198+
Note: The Format and Pattern columns serve different purposes:
199+
200+
`Pattern`: Use to validate that data matches a specific regex pattern (e.g., enforce that email addresses follow a certain format)
199201

200-
Note: If you want your data to MATCH a regex use the `Pattern` column. If you want your data to BE a regex pattern use this column, with the the `regex` value.
202+
`Format`: Use with the regex value to indicate that the data itself is a regex pattern being stored (not validated against one)
203+
204+
The format of this attribute. See [format](https://json-schema.org/understanding-json-schema/reference/type#format) The type of this attribute must be "string" or "string_list". The value of this column will appear as the `format` of this attribute in the JSON Schema. Must be one of:
201205

202206
- `date-time`
203207
- `email`
@@ -244,9 +248,14 @@ JSON Schema output:
244248

245249
### Pattern
246250

251+
Note: The Format and Pattern columns serve different purposes:
252+
253+
`Pattern`: Use to validate that data matches a specific regex pattern (e.g., enforce that email addresses follow a certain format)
254+
255+
`Format`: Use with the regex value to indicate that the data itself is a regex pattern being stored (not validated against one)
256+
247257
The regex pattern this attribute must match. The type of this attribute must be `string` or `string_list`. See [pattern](https://json-schema.org/understanding-json-schema/reference/regular_expressions#regular-expressions) The value of this column will appear as the `pattern` of this attribute in the JSON Schema. Must be a legal regex pattern as determined by the python `re` library.
248258

249-
Note: If you want your data to MATCH a regex use this column. If you want your data to BE a regex use the `Format` column, with the `regex` value.
250259

251260
Data Model:
252261

0 commit comments

Comments
 (0)