Commit 8edafac8 authored by elliot's avatar elliot

Changed ValidatorUSState to conform to the standard Doctrine_Validator_*...

Changed ValidatorUSState to conform to the standard Doctrine_Validator_* naming scheme and removed the old style from Doctrine_Validator
parent 89e12152
This diff is collapsed.
<?php <?php
class ValidatorUSState { class Doctrine_Validator_Usstate {
private static $states = array ( private static $states = array (
"AK" => true, "AK" => true,
"AL" => true, "AL" => true,
"AR" => true, "AR" => true,
"AZ" => true, "AZ" => true,
"CA" => true, "CA" => true,
"CO" => true, "CO" => true,
"CT" => true, "CT" => true,
"DC" => true, "DC" => true,
"DE" => true, "DE" => true,
"FL" => true, "FL" => true,
"GA" => true, "GA" => true,
"HI" => true, "HI" => true,
"IA" => true, "IA" => true,
"ID" => true, "ID" => true,
"IL" => true, "IL" => true,
"IN" => true, "IN" => true,
"KS" => true, "KS" => true,
"KY" => true, "KY" => true,
"LA" => true, "LA" => true,
"MA" => true, "MA" => true,
"MD" => true, "MD" => true,
"ME" => true, "ME" => true,
"MI" => true, "MI" => true,
"MN" => true, "MN" => true,
"MO" => true, "MO" => true,
"MS" => true, "MS" => true,
"MT" => true, "MT" => true,
"NC" => true, "NC" => true,
"ND" => true, "ND" => true,
"NE" => true, "NE" => true,
"NH" => true, "NH" => true,
"NJ" => true, "NJ" => true,
"NM" => true, "NM" => true,
"NV" => true, "NV" => true,
"NY" => true, "NY" => true,
"OH" => true, "OH" => true,
"OK" => true, "OK" => true,
"OR" => true, "OR" => true,
"PA" => true, "PA" => true,
"PR" => true, "PR" => true,
"RI" => true, "RI" => true,
"SC" => true, "SC" => true,
"SD" => true, "SD" => true,
"TN" => true, "TN" => true,
"TX" => true, "TX" => true,
"UT" => true, "UT" => true,
"VA" => true, "VA" => true,
"VI" => true, "VI" => true,
"VT" => true, "VT" => true,
"WA" => true, "WA" => true,
"WI" => true, "WI" => true,
"WV" => true, "WV" => true,
"WY" => true "WY" => true
); );
public function getStates() { public function getStates() {
return self::$states; return self::$states;
} }
/** /**
* @param Doctrine_Record $record * @param Doctrine_Record $record
* @param string $key * @param string $key
* @param mixed $value * @param mixed $value
* @param string $args * @param string $args
* @return boolean * @return boolean
*/ */
public function validate(Doctrine_Record $record, $key, $value, $args) { public function validate(Doctrine_Record $record, $key, $value, $args) {
return isset(self::$states[$value]); return isset(self::$states[$value]);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment