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 12 matches
Smarty Forum Index
Author Message
  Topic: Should SmartyValidate exist as a template function?
B00zy

Replies: 5
Views: 18159

PostForum: Add-ons   Posted: Tue Jul 27, 2004 3:28 pm   Subject: Should SmartyValidate exist as a template function?
My current solution is as follows:


session_start();
/* When developing and changing around variables a lot,
* I want to make sure the variables in the session are being
* reset every time.
...
  Topic: Should SmartyValidate exist as a template function?
B00zy

Replies: 5
Views: 18159

PostForum: Add-ons   Posted: Tue Jul 27, 2004 2:36 pm   Subject: Re: Should SmartyValidate exist as a template function?

3. Since $_POST is no longer empty, we're inside the first bracket. SmartyValidate::is_valid() will execute and will pass since there is no criteria to validate against.


That is incorrect, is_v ...
  Topic: Should SmartyValidate exist as a template function?
B00zy

Replies: 5
Views: 18159

PostForum: Add-ons   Posted: Tue Jul 27, 2004 8:34 am   Subject: Should SmartyValidate exist as a template function?
...or should it exist as a PHP function?

What I've determined over the past week of using SmartyValidate on a rather large project is that the recommended use of this extension is not the proper us ...
  Topic: SmartyValidate: Issues with empty variables
B00zy

Replies: 2
Views: 24255

PostForum: Add-ons   Posted: Sat Jul 24, 2004 5:22 pm   Subject: SmartyValidate: Issues with empty variables

Notice: Array to string conversion in /web/sites/beano/Smarty-2.6.3/libs/SmartyValidate.class.php on line 166


I understand where you're going with this though: continue to validate on an ac ...
  Topic: SmartyValidate: Issues with empty variables
B00zy

Replies: 2
Views: 24255

PostForum: Add-ons   Posted: Fri Jul 23, 2004 9:09 pm   Subject: SmartyValidate: Issues with empty variables
Using SmartyValidate-2.2 / Smarty-2.6.3


NOTE: this post has been and continues to be subject to editing.


When empty="anything" is set, $params
*** SmartyValidate.class.php.orig Tue Ju ...
  Topic: How to list vertically in a table (dynamically)
B00zy

Replies: 6
Views: 61255

PostForum: Tips and Tricks   Posted: Tue Jul 20, 2004 12:01 am   Subject: How to list vertically in a table (dynamically)
Thanks for the tip, Greg! In addition, here's how this can be done dynamically:


{assign var="columns" value="2"}
{math equation="ceil(count / columns& ...
  Topic: Session Problems
B00zy

Replies: 2
Views: 11492

PostForum: Add-ons   Posted: Mon Jul 19, 2004 7:19 pm   Subject: Fixed
I added...


session_start();
if (!count($_POST)) {
unset($_SESSION['SmartyValidate']);
}


Now refreshes the session when not submitting. W ...
  Topic: SmartyValidate Security Issues
B00zy

Replies: 2
Views: 11117

PostForum: Add-ons   Posted: Mon Jul 19, 2004 7:06 pm   Subject: Fix
OK, so after considering this for a while here is a working solution I've come up with.


if (count($_POST)) {
/* SmartyValidate should be PRE-loaded, otherwise
an attacke ...
  Topic: SmartyValidate Security Issues
B00zy

Replies: 2
Views: 11117

PostForum: Add-ons   Posted: Mon Jul 19, 2004 5:54 pm   Subject: SmartyValidate Security Issues
Wouldn't it be possible for an attacker to avoid SmartyValidate by simply not loading the page containing the {validate} tags and submitting the POST vars without ever calling that page? SmartyValidat ...
  Topic: SmartyValidate Feature Request (unless it already exists)
B00zy

Replies: 1
Views: 9401

PostForum: Add-ons   Posted: Mon Jul 19, 2004 5:32 am   Subject: SmartyValidate Feature Request (unless it already exists)
Yes, this already does exist... so the problem is related to my latest post: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=3023
  Topic: Session Problems
B00zy

Replies: 2
Views: 11492

PostForum: Add-ons   Posted: Mon Jul 19, 2004 5:15 am   Subject: Session Problems
I was trying...


{validate field="name" criteria="notEmpty"}


Now I have changed it to...


{validate field="name" criteria="isRegExp" ...
  Topic: SmartyValidate Feature Request (unless it already exists)
B00zy

Replies: 1
Views: 9401

PostForum: Add-ons   Posted: Mon Jul 19, 2004 4:46 am   Subject: SmartyValidate Feature Request (unless it already exists)
Is it possible to have more than one validation tag for a field?

For example


* I want to check if the field "FullName" is empty with criteria="notEmpty", if so message="Name cannot be empty"
...
 
Page 1 of 1
All times are GMT
Jump to:  


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