From: Andrea Zagli Date: Wed, 14 Jun 2017 14:33:39 +0000 (+0200) Subject: Wrong comparision value in ZakForm*ValidatorCompare*. X-Git-Tag: v0.1.0~1^2~6^2 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=c13b4696594b33779074a24ee6a41f153f37e3b7;p=zakform%2Flibzakform Wrong comparision value in ZakForm*ValidatorCompare*. --- diff --git a/src/formelementvalidatordate.c b/src/formelementvalidatordate.c index 55f0ca9..580fd2d 100644 --- a/src/formelementvalidatordate.c +++ b/src/formelementvalidatordate.c @@ -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; }; diff --git a/src/formvalidatorcompare.c b/src/formvalidatorcompare.c index 2053b14..be2e534 100644 --- a/src/formvalidatorcompare.c +++ b/src/formvalidatorcompare.c @@ -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) diff --git a/src/formvalidatorcomparedate.c b/src/formvalidatorcomparedate.c index 13089ee..038aa66 100644 --- a/src/formvalidatorcomparedate.c +++ b/src/formvalidatorcomparedate.c @@ -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; }; }