+static bool check_ip_multi_char(int c, const void *arg __attribute__((unused)))
+{
+ return (check_ipv4_multi_char(c) || check_ipv6_multi_char(c));
+}
+
+void widget_textbox_set_validator_ip(struct nc_widget_textbox *textbox)
+{
+ if (!textbox->set->ip_type) {
+ textbox->set->ip_type = new_fieldtype(check_ip_field, NULL);
+ }
+ set_field_type(textbox->widget.field, textbox->set->ip_type);
+}
+
+/*
+ * In a perfect world we would use link_fieldtype() but segfaults do not
+ * enhance the user experience.
+ */
+void widget_textbox_set_validator_ip_multi(struct nc_widget_textbox *textbox)