library/core/class.validation.php
public function ApplyRules($Fields) {
      foreach ($Fields as $Index => $Row) {
         $Validation = GetValue('Validation', $Row);
         if (!$Validation)
            continue;
         
         $FieldName = GetValue('Name', $Row, $Index);
         if (is_string($Validation)) {
            $this->ApplyRule($FieldName, $Validation);
         } elseif (is_array($Validation)) {
            foreach ($Validation as $Rule) {
               if (is_array($Rule)) {
                  $this->ApplyRule($FieldName, $Rule[0], $Rule[1]);
               } else {
                  $this->ApplyRule($FieldName, $Rule);
               }
            }
         }
      }
   }
public function ApplyRules($Fields) {
      foreach ($Fields as $Index => $Row) {
         $Validation = GetValue('Validation', $Row);
         if (!$Validation)
            continue;
         
         $FieldName = GetValue('Name', $Row, $Index);
         if (is_string($Validation)) {
            $this->ApplyRule($FieldName, $Validation);
         } elseif (is_array($Validation)) {
            foreach ($Validation as $Rule) {
               if (is_array($Rule)) {
                  $this->ApplyRule($FieldName, $Rule[0], $Rule[1]);
               } else {
                  $this->ApplyRule($FieldName, $Rule);
               }
            }
         }
      }
   }
public function ApplyRules ( $ Fields ) { foreach ( $ Fields as $ Index => $ Row ) { $ Validation = GetValue ( 'Validation' , $ Row ) ; if ( ! $ Validation ) continue ; $ FieldName = GetValue ( 'Name' , $ Row , $ Index ) ; if ( is_string ( $ Validation ) ) { $ this -> ApplyRule ( $ FieldName , $ Validation ) ; } elseif ( is_array ( $ Validation ) ) { foreach ( $ Validation as $ Rule ) { if ( is_array ( $ Rule ) ) { $ this -> ApplyRule ( $ FieldName , $ Rule [ 0 ] , $ Rule [ 1 ] ) ; } else { $ this -> ApplyRule ( $ FieldName , $ Rule ) ; } } } } }
Apply an array of validation rules all at once.
@param array $Fields
Apply an array of validation rules all at once .