SHARE
TWEET

Untitled

a guest Sep 23rd, 2011 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     if (empty($_POST) || !SmartyValidate::is_registered_form('ContactForm'))
  2.     {
  3.         SmartyValidate::connect($smarty, true);
  4.         SmartyValidate::register_form('ContactForm', true);
  5.         SmartyValidate::register_validator('checkContactName', 'contactName', 'notEmpty', false, false, 'trim', 'ContactForm');
  6.         SmartyValidate::register_validator('checkContactComment', 'contactComment', 'notEmpty', false, false, 'trim', 'ContactForm');
  7.         SmartyValidate::register_validator('checkContactEmail', 'contactEmail', 'isEmail', false, false, 'trim', 'ContactForm');
  8.     }
  9.     else
  10.     {
  11.         SmartyValidate::connect($smarty);
  12.         if(SmartyValidate::is_valid($_POST,'ContactForm'))
  13.         {
  14.                 SmartyValidate::disconnect();
  15.         }
  16.         else
  17.         {
  18.             $smarty->assign($_POST);
  19.         }
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top