Is it possible to change the validation.
I'm using Chronoforms v4.
Tks in advance
I'm using Chronoforms v4.
Tks in advance
Hi,
Sorry but I can't understand your question ?
Regards,
Max
Sorry but I can't understand your question ?
Regards,
Max
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
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
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,
Yes, that's the file as fa as I an see, and it's this code number:/^[-+]?\d*\.?\d+$/,email: you'd need to edit.
Please see this FAQ too.
Bob
Yes, that's the file as fa as I an see, and it's this code number:/^[-+]?\d*\.?\d+$/,email: you'd need to edit.
Please see this FAQ too.
Bob
Hi Greyhead,
That's what i have changed to this.
/^[-+]?\d*\.,?\d+$/
To allow "." and ",". In the javascript i:
1. clean the "."
2. replace the "," with "."
3. parse the number
The form works ok. but the error pops up every time i change a value.
http://poupar.iokis.com/index.php?option=com_chronoforms&tmpl=component&chronoform=form_emprestimos-Copy
Tks,
Renas
That's what i have changed to this.
/^[-+]?\d*\.,?\d+$/
To allow "." and ",". In the javascript i:
1. clean the "."
2. replace the "," with "."
3. parse the number
The form works ok. but the error pops up every time i change a value.
http://poupar.iokis.com/index.php?option=com_chronoforms&tmpl=component&chronoform=form_emprestimos-Copy
Tks,
Renas
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
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 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
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
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
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
I have changed to this one.
Now spread always get error with a comma only.😟
Many Tks,
Renas
This topic is locked and no more replies can be posted.