}
else
{
+ GPtrArray *messages;
+
+ messages = zak_form_element_get_messages (ZAK_FORM_ELEMENT (element));
+ if (messages != NULL
+ && messages->len > 0)
+ {
+ g_hash_table_insert (ht_attrs_option, "class", g_strdup_printf ("%s is-invalid", g_hash_table_lookup (ht_attrs_option, "class")));
+ }
+
g_hash_table_insert (ht_attrs_option, "class", g_strdup_printf ("%s form-check-input", g_hash_table_lookup (ht_attrs_option, "class")));
g_string_append_printf (ret, "\n<div class=\"form-check%s\">\n%s<label class=\"form-check-label\" for=\"%s_%d\"> %s</label>\n</div>",