Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [SMARTY] Smarty Validate
It could be a number of things, starting from different php version, 
different extensions availible, different php configuration, etc...
Check that 

On 4/23/05, Reynier Perez Mira <rperezm@estudiantes.uci.cu> wrote:
> 
> Well list:
> 
> Few ws ago I begin use SmartyValidate and all it's ok. But I move my 
> site to another server and I have some problems now. This is my code PHP:
> 
> if(empty($_POST)) {
> SmartyValidate::connect($template, true);
>  SmartyValidate::register_validator('user
name','uname','notEmpty',false);
>  SmartyValidate::register_validator('user
email','umail','notEmpty',false);
>  SmartyValidate::register_validator('user
email','umail','isEmail',false);
> 
>  SmartyValidate::register_validator('ucom
ments','ucomments','notEmpty',fals
e);
> $template->display("guestbook_sign.tpl");
> }else{
> SmartyValidate::connect($template);
> if(SmartyValidate::is_valid($_POST)) {
> SmartyValidate::disconnect();
> $template->display('guestbook_show.tpl');
> }else{
> $template->assign($_POST);
> $template->display("guestbook_sign.tpl");
> }
> 
> after I included all need library and initialize all vars. Something like 
> this:
> 
> require("./class/smarty/Smarty.class.php");
> require('./class/smarty/SmartyPaginate.class.php');
> require('class/smarty/SmartyValidate.class.php');
> 
> $template = new Smarty();
> 
> so this is part of my .tpl code in wich I try to validate some fields:
> 
> ....
> 
> <td>
> {validate id="ucomments" message="Debes introducir algún comentarioantes 
> de firmar el Libro"}
> <textarea name="ucomments" cols="55" rows="8" wrap="VIRTUAL" 
> id="ucomments"></textarea>
> </td>
> 
> ....
> 
> The error appear in broswer is:
> 
> Notice: Undefined offset: 1 in 
>  D:\WWW\jclub\class\smarty\SmartyValidate
.class.php on line 417 (just at th
e 
> top)
> 
> Warning: Smarty error: validate: validator id 'ucomments' is not 
> registered. in D:\WWW\jclub\class\smarty\Smarty.class.php on line 1088 
> (after textarea)
> 
> What's wrong? I not understand why if I move the site to another host and 
> not touch anything of code and the order of folders is the same, how can 
> pass this.
> 
> Regards
> 
> Reynier Pérez Mira
> 
> 3ero. Ing. Informática
> 
> Entre más inteligente me siento, más me doy cuenta de lo ignorante que 
> soy.
> 
>


Report this thread to moderator Post Follow-up to this message
Old Post
Vicente Werner
04-23-05 01:57 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:23 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.