/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/form/FormValidation.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/form/FormValidation.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jonen, Sat Sep 20 00:18:43 2003 UTC revision 1.3 by jonen, Thu May 6 16:27:22 2004 UTC
# Line 1172  class FormValidation { Line 1172  class FormValidation {
1172          }          }
1173          return TRUE;          return TRUE;
1174      }      }
1175    
1176        /**
1177         * Validate if the string matches a regex
1178         *
1179         * @param string - the regex string
1180         * @param string - the value to validate
1181         * @return TRUE = succes  FALSE = failed
1182         */
1183        function is_regex($regex, $str) {
1184            if (preg_match($regex, $str)) {
1185                return TRUE;
1186            } else {
1187                return FALSE;
1188            }
1189        }
1190    
1191  }  }
1192  ?>  ?>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed