PHP Classes

File: samples/rule.php

Recommend this page to a friend!
  Classes of Tom Schaefer   QValidation   samples/rule.php   Download  
File: samples/rule.php
Role: Example script
Content type: text/plain
Description: sample rule
Class: QValidation
Validate several types of value
Author: By
Last change: add
Date: 14 years ago
Size: 499 bytes
 

Contents

Class file image Download
<?php
include_once("config.inc.php");
include_once(
PLUGINDIR.DS."Validation".DS."DataType".DS."index.php");
include_once(
PLUGINDIR.DS."Validation".DS."Rule".DS."index.php");

$rule = new Validation_Rule_ISBN("3827370191");
if(
$rule->firstLevel()->secondLevel()->isValid()) {
    echo
"succeed";
} else {
    echo
"failure";
}


if(
Validation_Rule_ISBN::getInstance("3827370192")->firstLevel()->secondLevel()->isValid()) {
    echo
"succeed";
} else {
    echo
"failure";
}


print_r($rule);