.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Im writing a validation class for ZC, (already finished but havent posted yet) you can have a look if you want.
https://svn.rubikintegration.com/zen...validation.php
For example, to check if the customers_email_address passed in POST is not empty and is valid email:
PHP Code:$yvalidation = new yvalidation();
$rules = array('customers_email_address' => array(array('validation_is_not_empty'=>''),
array('validation_is_email'=>'')));
$yvalidation->set_params($_POST);
$yvalidation->set_rules($rules);
$error_counter = $yvalidation->run(); // store the number of errors here
Multiple fields can be checked at once, each field can be checked against multiple rules.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
Thanks, I will take a look..
for now I just did as follows (and it works for me):
Code:if(ereg('^[\s0-9]*$', $a-item1) === false){ $error = true; $messageStack->add('silentauction', 'Leave empty, or enter only numbers (dollar amount, no cents) in your bid input box 1!)'); } if ($a-item1!='' && $a-item1<= 600){ $error = true; $messageStack->add('silentauction', 'Your bid for Fall Buck is equal or bellow the reseved bid of $600!)'); }
Yeah, just do whatever works for you ^^.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me