priv = ZAK_CGI_FORM_GET_PRIVATE (zakcgiform);
- for (i == 0; i < priv->ar_elems->len; i++)
+ for (i = 0; i < priv->ar_elems->len; i++)
{
ZakCgiFormElement *element = (ZakCgiFormElement *)g_ptr_array_index (priv->ar_elems, i);
if (!ZAK_CGI_IS_FORM_ELEMENT_STRING (element))
g_string_append (str, tmp);
g_free (tmp);
- for (i == 0; i < priv->ar_elems->len; i++)
+ for (i = 0; i < priv->ar_elems->len; i++)
{
ZakCgiFormElement *element = (ZakCgiFormElement *)g_ptr_array_index (priv->ar_elems, i);
tmp = zak_cgi_form_element_render (element);
ZakCgiForm *form;
ZakCgiFormElement *element;
- ZakFormElementValidator *validator;
+ ZakFormElementValidatorRegex *validator;
zakcgimain = zak_cgi_main_new ();
zak_form_element_add_filter (ZAK_FORM_ELEMENT (element),
ZAK_FORM_ELEMENT_FILTER (zak_form_element_filter_trim_new ()));
validator = zak_form_element_validator_regex_new ();
- zak_form_element_validator_regex_set_regex (ZAK_FORM_ELEMENT_VALIDATOR_REGEX (validator), "^aaa$");
- zak_form_element_add_validator (ZAK_FORM_ELEMENT (element), validator);
+ zak_form_element_validator_regex_set_regex (validator, "^aaa$");
+ zak_form_element_add_validator (ZAK_FORM_ELEMENT (element), ZAK_FORM_ELEMENT_VALIDATOR (validator));
zak_form_form_add_element (ZAK_FORM_FORM (form), ZAK_FORM_ELEMENT (element));
element = zak_cgi_form_element_check_new_attrs ("chk", NULL);