A demonstration data structure

Here some documentation about the data structure.

This data structure has a few fields, to illustrate each sort of field.

A simple field of type string F Female M Male

Here some more documentation about this field.

As you can see, the choices are limited to F and M.

Another equivalent string field

This is to illustrate another mechanism to restrict the values to F and M, using a regular expression pattern.

A field that is a list of strings

As you can see, the maximum length of the list is 10, and the maximum length of each string in the list is 20.

Note that the default minimum length of a string field is 1, since it is often preferred to omit the field altogether than provide an empty string. But if you want you can make a distinction between a null value and an empty string, by accepting strings of 0 length.