Exemplo n.º 1
0
 public function validate($data)
 {
     if (parent::validate($data) == false) {
         return false;
     }
     foreach ($data as $key => $val) {
         if (Basis_Type_Types::getTypeString($val) != $this->typename) {
             return false;
         }
     }
     return true;
 }
Exemplo n.º 2
0
 public function validationErrorString($val)
 {
     $t = Basis_Type_Types::getTypeStringNoThrow($val);
     $name = $this->name();
     return "data of type [{$t}] passed into [{$name}] was invalid";
 }