Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[FIXED] Integer validation - allows character sandbox only 27 Sep 2012 09:16 #4056

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
Hi again
I have a standard integer field - using the predefined integer validation

Downloaded component - is OK
- have tested download on local site (last nights build)
t999999 will show a validation error as expected

In the sandbox
- t999999 will pass validation in the sand box only
- ttt999999 But will fail validation as expected

Have a great day

Please Log in or Create an account to join the conversation.

Re: Integer validation - allows character sandbox only 27 Sep 2012 09:28 #4059

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
At the begining regex are really fun, Now I am bored.

Well, this is a really simple regex.
There is absolutly no reason why it behaves different in sandbox for PHP.

There are 2 validations (JS, PHP)
I guess it is the JS validation that fails, because PHP is impossible.

Will check.

Thnks.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Integer validation - allows character sandbox only 27 Sep 2012 10:32 #4066

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
JS in sandbox definitely i had not saved the record

Please Log in or Create an account to join the conversation.

Re: Integer validation - allows character sandbox only 27 Sep 2012 12:22 #4075

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Is this the same project with the checkout issue?

V2.0 etc?

The only time I've experienced similar issues was in a project where I'd switched to V2.0 beta and MooTools->JQuery on an existing project.

If this is the same project as your other issue it is quite likely that both symptoms caused by one issue - JS.

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: Integer validation - allows character sandbox only 27 Sep 2012 14:31 #4095

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132

audibleid wrote: Is this the same project with the checkout issue?

NO not same project (thanks anyway)

@ admin i have built a test project "test validations" that shows this issue

Does not work (2.5 build)
test value = t999999
- no JS Incorrect Value Prompt when exiting field
- "t" is stripped on save (php)

CONFIG SETTINGS => Jquery - condensed - jdom complete - table

BUT it works with the following config (2.5 build)
test value = t999999
- i do get the JS Incorrect Value Prompt when exiting field
CONFIG SETTINGS => moo tools - condensed - reduced - model

Thanks

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

Re: Integer validation - allows character sandbox only 27 Sep 2012 14:49 #4096

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Sorry if you've already mentioned this but, are you wanting it to fail validation if anything other than a digit or digits are present in the input?

If that is the case why not try using a custom validation something like;
^\d*$
?

You could add more conditions to it to set lower and upper length vals like {10,100} if you say wanted at least ten digits but no more than 100 digits...
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: Integer validation - allows character sandbox only 27 Sep 2012 15:58 #4098

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132

Sorry if you've already mentioned this but, are you wanting it to fail validation if anything other than a digit or digits are present in the input?


I found this purely by mistake when testing redierctions and went "that's a " t " in there it should have failed" then tested the validation further to be able to produce the details for the ticket

Yes in short - i simply want the value to only be an integer for an integer field

I can confirm that under specific config setting (listed above) that it does allow only integer values as expected
but also found that under other config settings it will allow t999999 but not tt99999

thank you for you suggestion will take it on board as part of the work around

For any one looking to take your advice above I also suggest that the field needs to be limited in length relative to the allowed size of the database field type as well to prevent issues as you have already suggested thank you

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

Re: Integer validation - allows character sandbox only 03 Oct 2012 13:01 #4225

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
This is because the default regex furnished by Cook is wrong.
Fixed now.

TODO :
On the combo of the predefined regex, choose another one, then reselect the 'numeric' regex.
The regex is now poulated with the good one.
Coding is now a piece of cake
The following user(s) said Thank You: BTB300

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.075 seconds

Let me first state that this is an amazing and fascinating product exactly what I was looking for. In just a few hours (listening to the very well made and clearly understandable videos learning doing) I completed and installed my first component. I am now in the second refining phase. I will make a recommenation in JED. Thanks for the effort in creating such a great product. Incidentally some of the best Joomla extension I use are of French origin !
Giori (Forum)

Get Started