Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

SmartyValidate: why won't my assign assign, dammit?

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
dariog
Smarty n00b


Joined: 30 Jan 2005
Posts: 2

PostPosted: Sun Jan 30, 2005 8:39 am    Post subject: SmartyValidate: why won't my assign assign, dammit? Reply with quote

Hi,

I'm trying to validate an integer field with smartyValidate.


[php:1:62076909bc]<?php

{validate field="$field_name" criteria="isInt" message="$field_label must be an integer!" assign="anything"}

?>[/php:1:62076909bc]

(The fields are dynamically generated, i.e there is a template for each type of field, and however many of each type are needed are included by a PHP script)

However, when i do:



[php:1:62076909bc]<?php

Errors: {$anything}

?> [/php:1:62076909bc]

There is no output!

Help!
Back to top
View user's profile Send private message
dariog
Smarty n00b


Joined: 30 Jan 2005
Posts: 2

PostPosted: Sun Jan 30, 2005 8:52 am    Post subject: Reply with quote

Hey,

Well, figured it out myself. Its something to do with the session vars that SmartyValidate uses to store its data.

The solution is just to flush your session vars (close your browser or call session_destroy()).

Thanks guys, great Add-on!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


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