From 7bba0a44a5457e5599e5294998305287e5059be5 Mon Sep 17 00:00:00 2001 From: Stephan de Wit Date: Mon, 8 Jan 2024 10:53:10 +0100 Subject: [PATCH] Development: Field Types: Add MacAddressField and update HostnameField --- .../development/frontend/models_fieldtypes.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/development/frontend/models_fieldtypes.rst b/source/development/frontend/models_fieldtypes.rst index 9af10c01..276619e6 100644 --- a/source/development/frontend/models_fieldtypes.rst +++ b/source/development/frontend/models_fieldtypes.rst @@ -219,6 +219,8 @@ Check if hostnames are valid, includes the following options: "HostWildcardAllowed", "Y,N", "Allow :code:`*` for all hostnames" "FqdnWildcardAllowed", "Y,N", "Allow partial wildcard for fully qualified domain names (e.g. :code:`*.my.top.level.domain`)" "ZoneRootAllowed", "Y,N", "Allow the zone root marker (:code:`@`)" + "AsList", "Y,N", "Field type should return list items" + "FieldSeparator", ":code:`text`", "Separator character to use" IntegerField @@ -324,6 +326,22 @@ The following example would read the enabled property from the config xml, which When functionality migrates to mvc, you can switch the type and supply migration code to load the initial values. +MacAddressField +------------------------------------ + +Validate if the given value (or multiple values) is a valid MAC address. + +.. csv-table:: MacAddressField + :header: "Parameter", "Options", "Purpose" + :widths: 30, 20, 40 + + "default", ":code:`text`", "Default value for new attributes" + "Required", "Y,N", "Mark field as required" + "ValidationMessage", ":code:`text`", "Error message on validation failure" + "AsList", "Y,N", "Field type should return list items" + "FieldSeparator", ":code:`text`", "Separator character to use" + + ModelRelationField ------------------------------------