Patterns for Metadata editor

The patterns attribute for metadata fields in metadata groups can be set to Javascript style regular expression patterns that are matched to true / false by a Javascript validator before the metadata form is saved.

Using this you can setup more complex field types to support different entry schemas.

Email address field

This is an example of an email field:

^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$

Text only field

An example of a text but no numbers field:

^[a-zA-Z'.\s]{1,40}$

IP Address field

A field that will take an IP address such as 192.168.0.1:

^(([1-9][0-9]{0,2})|0)\.(([1-9][0-9]{0,2})|0)\.(([1-9][0-9]{0,2})|0)\.(([1-9][0-9]{0,2})|0)$

Timecode field

Timecode field that will allow entry such as 00:00:00:00 and allows 30 fps:

^(([0-9][0-9])|00)\:(([0-5][0-9])|00)\:(([0-5][0-9])|00)\:(([0-2][0-9])|00)$