Posted By

kurt_penang on 08/28/09


Tagged

livevalidation


Versions (?)

Declare multiple validation using livevalidation(http://www.livevalidation.com/)


 / Published in: JavaScript
 

URL: http://kurt-network.net/

  1. <script type="text/javascript">
  2.  
  3. <?php
  4. $f = array("studentfile","course_code","mark","name_course","tutor","exam_date","exam_location","reason","cheque_no");
  5.  
  6. for($i=0;$i<count($f);$i++) {
  7.  
  8. echo "var f".$i." = new LiveValidation('".$f[$i]."');";
  9. echo "f".$i.".add(Validate.Presence,{ failureMessage: '".$this->lang->line('error')."'});";
  10.  
  11.  
  12. }
  13. ?>
  14.  
  15. </script>

Report this snippet  

You need to login to post a comment.