Is it possible to change the validation.
I'm using Chronoforms v4.
Tks in advance
Hi,
Sorry but I can't understand your question ?
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi renas,
The 'number' validation is included in the formcheck-ui.js file - you could change this but when you upgrade ChronoForms it will be over written. It's probably better to add a custom validation.
The Regular expression used is /^[-+]?\d*\.?\d+$/ To allow either a stop or a comma you could change this to /^[-+]?\d*[\.,]?\d+$/
Bob
Hi GreyHead,
Is this valid for the last version?
The file is "formcheck-yui.js"?
I am trying this number above and the message pops up every time for a number validation.
122.353,03
Tks,
Renas
Hi Renas,
I tried the form in FireFox and IE and didn't get any errors.
Bob
Hi GreyHead,
That's what i have made.
1. Go to Spread and just change from 0,5 to 0,54
2. Selected another box
3. Invalid number appeared
Tks,
Renas
Hi Renas,
The Regex requires both . & , please try /^[-+]?\d*[.,]?\d+$/
Bob
Hi Greyhead,
As i can see this is expecting one of them.
In some cases they exist both as this:
100.555,2
The "." separates thousand
The "," separates decimal
Tks,
Renas
Hi Renas,
I think that the previous version required 999,.99 which probably isn't normal
Bob
Hi Greyhead,
Is not.
Now works with "," or "." but not both.
Is possible to put something like this?
100.555,2
This can be ignored. But can be tricky.
Do you think this is possible?
Tks,
Renas
Hi GreyHead,
I have changed to this one.
Now spread always get error with a comma only.😟
Many Tks,
Renas
Hi GreyHead,
I will try a regex that can do this and post a solution if i found.
If not i will use your first solution.
Not the best one, but solves the problem for now.
Tks,
Renas