To add a content model, follow these steps:
-
In the Content Models page, select Add Content Model. The following page is displayed.
-
Select one from the following options:
- Object
- String
- Number
- Boolean
- Date Time
Object content models
An Object content model is useful when you need a combination of all field types such as string, number, boolean, or date-time.
If you selected the Object option, the page will show the General, Details, Appearance, and Preview tabs.

-
Navigate to the General tab and enter the following information:
- Label - The field name shown in the Lana app and within your store
- Unique Identifier - This is the internal identifier. This cannot be changed once you save created the content model.
-
Navigate to the Details tab and click Add fields to start building your object content model.
-
The Add Object Field dialog will appear. Select from the following options:
- String
- Number
- Boolean
- Date Time
-
If you select the String or Number option, the General, Details, Appearance, and Preview tabs will be displayed in the dialog. If you select the Boolean or Date Time option, the General, Appearance, and Preview tabs will be displayed.
-
Configure the field type using the tabs shown. Refer to the String, Number, Boolean, or Date Time content model sections for additional guidance on each specific type.
-
Add the new field to the object content model by clicking Save
-
Click Add another to add an additional field to the content model.
-
When you have completed adding all the fields you require to the object content model, click Save.
Note: An object content model cannot contain an object field type.
String content models
If you selected the String option, the page will show the General, Details, Appearance, and Preview tabs:

-
Navigate to the General tab and enter the following information:
- Label - The field name shown in the Lana app and within your store
- Unique Identifier - The is the internal identifier. This cannot be changed once you save created the content model.
-
Navigate to the Details tab to add field validation. Field validation can check user field inputs match the validation rules you create. For instance, you could set a validation rule for a minimum of 10 characters. In this example, field inputs less than 10 characters would be rejected while those of at least 10 characters are allowed.
-
Set minimum number of characters - Once this option is selected, two fields are shown. Enter values for both field:
- Minimum number of characters - The minimum number of characters accepted for the field.
- Custom error message - The message that is displayed when a user enters an invalid input into the field.
-
Set maximum number of characters - Once this option is selected, two fields are shown. Enter values for both fields:
- Maximum number of characters - The maximum number of characters accepted for the field.
- Custom error message - The message that is displayed when a user enters an invalid input into the field.
-
Match a specific pattern (Advanced) - This option allows you to set a regular expression (commonly referred to as regex) for a field to match a predefined pattern. For example, you could enter a regex to validate the input is a valid US ZIP code. Once this option is selected, two fields are shown. Enter values for both field:
- Regular Expression Pattern - The regex code snippet. Refer to the list of common regular expression patterns below.
- Custom error message - The message that is displayed when a user enters an invalid input into the field.
-
Default value - When set the custom field is prepopulated with this value.
-
Enum Value - This refers to enumerated types, which are predefined values that users can select. For example, if users need to select either the United States or the United Kingdom from a radio box field you could enter the following:
Note: You can use the Preview tab to test your field validation rules.
-
-
Navigate to the Appearance tab to change how the field looks in the Lana app. Select one of the following options:
- String
- Text Area
- Web URL
- Dropdown
- Radio
- Reference
Use the Help Text field to show text alongside the field to assist users in entering the desired information.
Select Reference if you want to link to an existing Image File, File, Product, Variant, Category, Brand or Content Block.
-
Navigate to the Preview tab to test the field you have just created. Select Save to save the new content. If the product is successfully added, it is displayed in the Content Models page.
Common Regular Expression Patterns (Regex):
Validator | Regex |
---|---|
Email Address | /^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6})*$/ |
Web Address (HTTPS) | /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*)/ |
Web Address (protocol optional) | /(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/ |
Australian Postcode | \d{4} |
ZIP Code (US) | ^[0-9]{5}(-[0-9]{4})?$ |
United Kingdom Postal Code | ^([A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW])\ [0-9][ABD-HJLNP-UW-Z]{2}|(GIR\ 0AA)|(SAN\ TA1)|(BFPO\ (C\/O\ )?[0-9]{1,4})|((ASCN|BBND|[BFS]IQQ|PCRN|STHL|TDCU|TKCA)\ 1ZZ))$ |
US Phone Number | ((\(\d{3}\)?)|(\d{3}))([\s-./]?)(\d{3})([\s-./]?)(\d{4}) |
UK Phone Number | ^((\(?0\d{4}\)?\s?\d{3}\s?\d{3})|(\(?0\d{3}\)?\s?\d{3}\s?\d{4})|(\(?0\d{2}\)?\s?\d{4}\s?\d{4}))(\s?\#(\d{4}|\d{3}))?$ |
UK Postal Code | (((^[BEGLMNS][1-9]\d?) | (^W[2-9] ) | ( ^( A[BL] | B[ABDHLNRST] | C[ABFHMORTVW] | D[ADEGHLNTY] | E[HNX] | F[KY] | G[LUY] | H[ADGPRSUX] | I[GMPV] | JE | K[ATWY] | L[ADELNSU] | M[EKL] | N[EGNPRW] | O[LX] | P[AEHLOR] | R[GHM] | S[AEGKL-PRSTWY] | T[ADFNQRSW] | UB | W[ADFNRSV] | YO | ZE ) \d\d?) | (^W1[A-HJKSTUW0-9]) | (( (^WC[1-2]) | (^EC[1-4]) | (^SW1) ) [ABEHMNPRVWXY] ) ) (\s*)? ([0-9][ABD-HJLNP-UW-Z]{2})) | (^GIR\s?0AA) |
Date with slash (such as XX/XX/YYYY) | ^\d{1,2}\/\d{1,2}\/\d{4}$ |
Note: You can search for additional regular expression (regex) patterns at http://regexlib.com. Lana is unable to provide support for your regex patterns.
Number content models
Number content fields are useful for prices, part numbers, or number-based identifiers.
Select the Number option, the page will show the General, Details, Appearance, and Preview tabs:

-
Navigate to the General tab and enter the following information:
- Label - The field name shown in the Lana app and within your store
- Unique Identifier - This is the internal identifier. It cannot be changed once you save created the content model.
-
Navigate to the Details tab to add field validation. Field validation can check user field inputs to match the validation rules you create. To enable field validation enter values for the following fields:
-
Set minimum number value - Once this option is selected, two fields are shown. Enter values for both field:
- Minimum number value - The minimum number accepted for the field.
- Custom error message - The message that is displayed when a user enters an invalid input into the field.
-
Set maximum number value - Once this option is selected, two fields are shown. Enter values for both field:
- Maximum number value - The maximum number accepted for the field.
- Custom error message - The message that is displayed when a user enters an invalid input into the field.
-
A whole number (integer) is required - Once this option is selected, a whole number or integer is required. For instance, 5 would be allowed but 5.0 would be disallowed.
-
-
Navigate to the Appearance tab to change how the field looks in the Lana app. Select one of the following options:
- Number
- Percentage
- Rating
Use the Help Text field to show text alongside the field to assist users in entering the desired information.
-
Navigate to the Preview tab to test the field you have just created. Select Save to save the new content. If the product is successfully added, it is displayed in the Content Models page.
Boolean content models
A boolean is when there is a positive and negative value such as True/False or Yes/No. Boolean field types are useful for indicating a product attribute that is either true or false such as ‘Contains Gluten: Yes’.
-
To create a boolean based content model select the Boolean option, the page will show the General, Appearance, and Preview tabs:
-
Navigate to the General tab and enter the following information:
- Label - The field name shown in the Lana app and within your store
- Unique Identifier - This is the internal identifier. This cannot be changed once you save created the content model.
-
Navigate to the Appearance tab to change how the field looks in the Lana app. Select one of the following options:
- Checkbox
- Toggle
Use the Help Text field to show text alongside the field to assist users in entering the desired information.
-
Navigate to the Preview tab to test the field you have just created. Select Save to save the new content. If the product is successfully added, it is displayed in the Content Models page.
Note: When a checkbox is selected or a toggle is active that indicates a positive (true or yes) value.
Date Time content models
Date Time content models are useful for indicating product expiry dates or event dates.
-
To create a date-time content model select the Date Time option, the page will show the General, Appearance, and Preview tabs:
-
Navigate to the General tab and enter the following information:
- Label - The field name shown in the Lana app and within your store
- Unique Identifier - This is the internal identifier. This cannot be changed once you save created the content model.
-
Navigate to the Appearance tab to change how the field looks in the Lana app. Select one of the following options:
- Date
- Date and Time
Use the Help Text field to show text alongside the field to assist users in entering the desired information.
-
Navigate to the Preview tab to test the field you have just created. Select Save to save the new content. If the product is successfully added, it is displayed in the Content Models page.