bullbearg VIP
Total posts: 61
03 Nov 2014 14:01

может я чего не понимаю, но у меня не получается ввести отрицательное число по полю digit

Last Modified: 06 Nov 2014


pepperstreet VIP
Total posts: 3,837
03 Nov 2014 19:15

Good point. Confirmed.

  • if min value is a negative value, the validation does not work anymore.
  • frontend input does not allow any negative sign i.e. no minus -

Would be nice to have negative values ;)


Konstantin
Total posts: 1,113
04 Nov 2014 09:52

Added signs


bullbearg VIP
Total posts: 61
04 Nov 2014 12:26

pepperstreet Good point. Confirmed.

  • if min value is a negative value, the validation does not work anymore.* frontend input does not allow any negative sign i.e. no minus -

Would be nice to have negative values ;)

are you try it? it has name - invert logic. :) imho this paramert set limit from minumim to maximum. if you set min eq 10 and max eq 50, then you not enter any digit 50.

imho problem in javascript

` min.on('keyup', function(){ Cobalt.formatFloat(this, params->get('params.decimals_num', 0);?>, params->get('params.max_num', 10);?>) var val = this.value;

    if(parseInt(val) > 0)
    {
        max.val(sldr.slider('values', 1));
    }
    else
    {
        max.val('');
    }

`

imho the line "max.val('');" has error.


pepperstreet VIP
Total posts: 3,837
04 Nov 2014 16:19

bullbearg if you set min eq 10 and max eq 50, then you not enter any digit 50.

Yes, that looks like a logical bug that needs to be discussed:

Actually the parameter input for MIN MAX implies that it should include the MIN MAX value as a valid input!

On the other hand, the current frontend validation message says that the values have to be between MIN and MAX. So, actually the validation seems correct from this particular point of view.

A current workaround would be to enter a higher (+1) value in backend... But that might look strange in frontend error message, doesn't it? e.g. you want values from 1-100, you would get a validation message with a MAX of 101. Not very intuitive. No good UX.


Suggestions / Ideas for improvement

  • except the MIN and MAX values as a valid input
  • choose aother "wording" in the validation message like:
    "Please, enter values from 1 to 100"
    "Only values from 1 to 100 are allowed"

Konstantin
Total posts: 1,113
06 Nov 2014 11:15

Added some fixes.

pepperstreet choose aother "wording" in the validation message like:

"Please, enter values from 1 to 100"

"Only values from 1 to 100 are allowed"

added sprintf, so now you can translate D_MINTOBIG, D_MINBIGEMAX, D_MAXTOSMALL as you want, addeding 2 '%s' in translations. First min value, second - max.

Powered by Cobalt