numericFormat length

Tags: #<Tag:0x00007f4524044a50>

Hi, there is been a long time, but I`m back hihi.

So I’m with a problem that in some cells I have to limit the length of numbers, some sort of only accept 9.999,99 as the max number of digits. I’m struggling to make this limit, there is an easy way to do it? I’m using numericFormat with a pattern and culture and was trying to put a validator in the number too.

Hi @dartajunior3, welcome back.

Do you plan to accept nearly 10k digits or the 9.999,99 should be the biggest accepted value? As I assume if someone adds anything bigger than 9.999,99 (or something that is not a number) you want to mark the cell as invalid. Am I right?

Hi Aleksandra, sort of this. I think it will be ok to make a validator for the length but maybe the user will want to be unable to insert more than a number of numbers as I said for example the user only can input 9999 if the user tries to input 99999 it will be blocked

and what about a maxlength=4 for the cell editor?

1 Like

I will try here, and later I’ll give u a feedback thanksss

1 Like

It work fine @aleksandra_budnik thanks.
Now I’m with another problem, I have an validator in one of my cloums. When I clear the full table the validator still active like that.

There is any way to reset this validator when I clear the whole table?

thanks for helping :blush:

The invalid cell status should reset unless you used allowEmpty: false. Here is an example that you can test https://jsfiddle.net/eocmr8zn/4/