Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Search found 17 matches
Smarty Forum Index
Author Message
  Topic: Bug in SmartyValidate 2.8/2.9
sguillory6

Replies: 0
Views: 10892

PostForum: Add-ons   Posted: Tue Aug 14, 2007 1:28 pm   Subject: Bug in SmartyValidate 2.8/2.9
There is a bug in SmartyValidate 2.8 (I use 2.8, but I examined the 2.9 source and it exists there also) involving multi-field validators. If you have a situation like this:

SmartyValidate: ...
  Topic: Problem related to form's is_init field
sguillory6

Replies: 0
Views: 4725

PostForum: Add-ons   Posted: Fri Jun 02, 2006 6:16 pm   Subject: Problem related to form's is_init field
I am running into a problem related to the is_init field. When you register a form, SmaryValidate sets the is_init key under the form data in the session to true.

I believe that when the Smarty va ...
  Topic: SmartyValidate - serious problems with browser "Back&qu
sguillory6

Replies: 9
Views: 21270

PostForum: Add-ons   Posted: Thu May 04, 2006 4:47 am   Subject: SmartyValidate - serious problems with browser "Back&qu
The duplication was intentional to demonstrate that:

1) The registration of validators has *nothing* to do with whether the PHP script was called with a POST HTTP request or a GET HTTP request

a ...
  Topic: SmartyValidate - serious problems with browser "Back&qu
sguillory6

Replies: 9
Views: 21270

PostForum: Add-ons   Posted: Wed May 03, 2006 9:12 am   Subject: Smarty Validate and back button/reload
I ran into the same issue, and if you code your smarty setup according to the example in the documentation it is unavoidable. I now structure my code like this:

$smarty = new MySmarty();
if (empty ...
  Topic: Another related possible bug in Smarty Validate
sguillory6

Replies: 1
Views: 6206

PostForum: Add-ons   Posted: Tue Mar 28, 2006 7:19 pm   Subject: Little bug in my patch to change semantics of $empty
My original fix had a bug in that the if empty was true for a multi-field validator and not all validators were empty, that actual validator would not get run. Here is the fix:

$_all_empty = false; ...
  Topic: Another related possible bug in Smarty Validate
sguillory6

Replies: 1
Views: 6206

PostForum: Add-ons   Posted: Tue Mar 28, 2006 6:55 pm   Subject: Another related possible bug in Smarty Validate
I have discovered another behaviour in SmartyValidate related to the other multifield validation issue I discovered, although this one my be more difficult to classify as a bug. It depends on semantic ...
  Topic: Possible bug in SmartyValidate 2.6
sguillory6

Replies: 0
Views: 5029

PostForum: Add-ons   Posted: Tue Mar 28, 2006 5:55 pm   Subject: Possible bug in SmartyValidate 2.6
I have discovered a behavior in SmartyValidate 2.6 which may be a bug.

I have a form with a "Ship Date" field, and a "Cancel Date" field. The business rules are that if a user specifies a ship dat ...
  Topic: SmartyValidate - isDate: Does it work at all?
sguillory6

Replies: 11
Views: 12718

PostForum: General   Posted: Mon Feb 20, 2006 9:47 pm   Subject: SmartyValidate - isDate: Does it work at all?
Well, actually I recall looking around and seeing a natural date selector.. one where you could choose Next Thursday as the date or whatever...

When you actually put it all into practice though, ar ...
  Topic: SmartyValidate - isDate: Does it work at all?
sguillory6

Replies: 11
Views: 12718

PostForum: General   Posted: Mon Feb 20, 2006 9:44 pm   Subject: SmartyValidate - isDate: Does it work at all?
Well, actually I recall looking around and seeing a natural date selector.. one where you could choose Next Thursday as the date or whatever...

When you actually put it all into practice though, ar ...
  Topic: SmartyValidate - isDate: Does it work at all?
sguillory6

Replies: 11
Views: 12718

PostForum: General   Posted: Mon Feb 20, 2006 9:16 pm   Subject: SmartyValidate - isDate: Does it work at all?
The beauty of the SmartyValidate system, is that you have the freedom to create you own validators...

Oh quite true, I agree. I just wonder how many users of SmartyValidate out there realize that " ...
  Topic: SmartyValidate - isDate: Does it work at all?
sguillory6

Replies: 11
Views: 12718

PostForum: General   Posted: Mon Feb 20, 2006 8:52 pm   Subject: Time to get ready for PHP 5.1!
Looks like it's a PHP 5.1 issue. The strtotime function went from returning -1 in 5.0 and previous to returning FALSE in 5.1. I have attached a patch. By the way, this is a pretty weakass isDate valid ...
  Topic: Setting up multiple transforms for a validator
sguillory6

Replies: 2
Views: 5172

PostForum: General   Posted: Mon Feb 20, 2006 8:32 pm   Subject: Thanks
comma separate them.

SmartyValidate::register_validator('fullname', 'FullName', 'notEmpty', false, false, 'trim,default:DefaultUser');
  Topic: SmartyValidate - isDate: Does it work at all?
sguillory6

Replies: 11
Views: 12718

PostForum: General   Posted: Mon Feb 20, 2006 8:31 pm   Subject: SmartyValidate - isDate: Does it work at all?
sample code / template ?

Uh, the one from the readme posted at:

http://www.phpinsider.com/php/code/SmartyValidate/

I have now written code to exercise every canned validate that ships with
...
  Topic: Setting up multiple transforms for a validator
sguillory6

Replies: 2
Views: 5172

PostForum: General   Posted: Mon Feb 20, 2006 7:04 pm   Subject: Setting up multiple transforms for a validator
I am a little confused as to how I might set up multiple transforms for a validator, say a trim and a default transform. I am guessing something like:

SmartyValidate::register_validator('fullna ...
  Topic: Default directory for config_load() function
sguillory6

Replies: 3
Views: 5629

PostForum: General   Posted: Mon Feb 20, 2006 6:54 pm   Subject: Thanks.
I have it on my list to go look at the Smarty and SmartyValidate source for a number of issues, but just posting to the forum while porting some struts code as things arise until I have time.

Than ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP