Page block validators¶
Validators check values passed to Page block attributes. The following block validators are available:
required- checks whether the attribute is providedregexp- validates attribute according to the provided regular expressionnot_blank- checks whether the attribute isn't left emptynot_blank_richtext- checks whether arichtextattribute isn't left emptycontent_type- checks whether the selected content types match the provided valuescontent_container- checks whether the selected content item is a container
Note
Don't use the required and not_blank validators for richtext attributes.
Instead, use not_blank_richtext.
For each validator you can provide a message that displays in the Page Builder when an attribute field doesn't fulfill the criteria.
Additionally, for some validators you can provide settings under the
ibexa_fieldtype_page.blocks.<block_name>.validators.regexp.options configuration key, for example:
1 2 3 4 5 6 7 8 | |