Validate

From: Date: Mon, 13 Jun 2005 19:11:02 +0000
Subject: Validate
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12685@lists.php.net to get a copy of this message
When I try to validate using SmartyValidate plugin in this way: <input name="uname" id="uname" type="text" size="25" maxlength="25"/> <span class="info" title="{#UNOMBREUSUARIOAYUDA#|escape:"htmlall"}"><img src="themes/images/help.gif" align="middle" border="0" class="help" value="{$uname|escape:"htmlall"}" /></span>&nbsp;{validate id="ufullname" message="<span class='errorline'>El nombre de usuario no puede estar vacío o debe contener más de 3 carácteres</span>"} The page always show the error message. This is the PHP Code: if(empty($_POST)) { SmartyValidate::connect($tpl, true); SmartyValidate::register_validator('ufullname','uname','notEmpty',false); SmartyValidate::register_validator('useremail','ucorreo','isEmail',false); SmartyValidate::register_validator('usernickname','unombreusuario','notEmpty',false); SmartyValidate::register_validator('userclave','uclave01:uclave02','isEqual'); $tpl->display('uregistro.tpl'); } else { SmartyValidate::connect($tpl); if(SmartyValidate::is_valid($_POST)) { SmartyValidate::disconnect(); $tpl->display('uregistro.tpl'); } else { $tpl->assign($_POST); $tpl->display('uregistro.tpl'); } } Whiy? Reynier Pérez Mira 3er. año Ing. Informática

« previous php.smarty.general (#12685) next »