]> saetta.ns0.it Git - zakform/libzakform/commitdiff
Wrong comparision value in ZakForm*ValidatorCompare*.
authorAndrea Zagli <azagli@libero.it>
Wed, 14 Jun 2017 14:33:39 +0000 (16:33 +0200)
committerAndrea Zagli <azagli@libero.it>
Wed, 14 Jun 2017 14:33:39 +0000 (16:33 +0200)
src/formelementvalidatordate.c
src/formvalidatorcompare.c
src/formvalidatorcomparedate.c

index 55f0ca9008f9128c00af5ec5c9b8b2e97d195a1c..580fd2db99c0a0372e5ff9741b0613b1ffc5745c 100644 (file)
@@ -352,7 +352,7 @@ zak_form_element_validator_date_validate (ZakFormElementValidator *validator_dat
                                                                {
                                                                case -1:
                                                                        ret = (priv->compare_type == ZAK_FORM_COMPARE_TYPE_LESSER
-                                                                              || priv->compare_type == ZAK_FORM_COMPARE_TYPE_NOT_EQUAL);
+                                                                              || priv->compare_type == ZAK_FORM_COMPARE_TYPE_LESSER_EQUAL);
                                                                        break;
 
                                                                case 0:
@@ -363,7 +363,7 @@ zak_form_element_validator_date_validate (ZakFormElementValidator *validator_dat
 
                                                                case 1:
                                                                        ret = (priv->compare_type == ZAK_FORM_COMPARE_TYPE_GREATER
-                                                                              || priv->compare_type == ZAK_FORM_COMPARE_TYPE_NOT_EQUAL);
+                                                                              || priv->compare_type == ZAK_FORM_COMPARE_TYPE_GREATER_EQUAL);
                                                                        break;
                                                                };
 
index 2053b14bb834d26f56285f8d85f1982a751ac709..be2e53482f99c009a8b07ed078d0551b786ba995 100644 (file)
@@ -233,7 +233,7 @@ zak_form_validator_compare_validate (ZakFormValidator *validator)
                        if (comp < 0)
                                {
                                        ret = (priv->type == ZAK_FORM_COMPARE_TYPE_LESSER
-                                              || priv->type == ZAK_FORM_COMPARE_TYPE_NOT_EQUAL);
+                                              || priv->type == ZAK_FORM_COMPARE_TYPE_LESSER_EQUAL);
                                }
                        else if (comp == 0)
                                {
@@ -244,7 +244,7 @@ zak_form_validator_compare_validate (ZakFormValidator *validator)
                        else if (comp > 0)
                                {
                                        ret = (priv->type == ZAK_FORM_COMPARE_TYPE_GREATER
-                                              || priv->type == ZAK_FORM_COMPARE_TYPE_NOT_EQUAL);
+                                              || priv->type == ZAK_FORM_COMPARE_TYPE_GREATER_EQUAL);
                                };
 
                        if (!ret)
index 13089ee14c94a2bfb80a09feaf403304ac6bb496..038aa663de4da60585480e1f6baf8f07d69faf3c 100644 (file)
@@ -244,7 +244,7 @@ zak_form_validator_compare_date_validate (ZakFormValidator *validator)
                                                {
                                                case -1:
                                                        ret = (priv->type == ZAK_FORM_COMPARE_TYPE_LESSER
-                                                              || priv->type == ZAK_FORM_COMPARE_TYPE_NOT_EQUAL);
+                                                              || priv->type == ZAK_FORM_COMPARE_TYPE_LESSER_EQUAL);
                                                        break;
 
                                                case 0:
@@ -255,7 +255,7 @@ zak_form_validator_compare_date_validate (ZakFormValidator *validator)
 
                                                case 1:
                                                        ret = (priv->type == ZAK_FORM_COMPARE_TYPE_GREATER
-                                                              || priv->type == ZAK_FORM_COMPARE_TYPE_NOT_EQUAL);
+                                                              || priv->type == ZAK_FORM_COMPARE_TYPE_GREATER_EQUAL);
                                                        break;
                                                };
                                }