Changed ValidatorUSState to conform to the standard Doctrine_Validator_* naming scheme and removed the old style from Doctrine_Validator
This commit is contained in:
parent
89e1215296
commit
8edafac8e4
@ -107,11 +107,11 @@ class Doctrine_Validator {
|
|||||||
$class = "Doctrine_Validator_".ucwords(strtolower($name));
|
$class = "Doctrine_Validator_".ucwords(strtolower($name));
|
||||||
if(class_exists($class)) {
|
if(class_exists($class)) {
|
||||||
self::$validators[$name] = new $class;
|
self::$validators[$name] = new $class;
|
||||||
} elseif(class_exists($name."Validator")) {
|
} else {
|
||||||
self::$validators[$name] = new $name."Validator";
|
|
||||||
} else
|
|
||||||
throw new Doctrine_Exception("Validator named '$name' not availible.");
|
throw new Doctrine_Exception("Validator named '$name' not availible.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return self::$validators[$name];
|
return self::$validators[$name];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class ValidatorUSState {
|
class Doctrine_Validator_Usstate {
|
||||||
private static $states = array (
|
private static $states = array (
|
||||||
"AK" => true,
|
"AK" => true,
|
||||||
"AL" => true,
|
"AL" => true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user