Skip to content

Instantly share code, notes, and snippets.

@kylebragger
Created September 15, 2010 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebragger/580002 to your computer and use it in GitHub Desktop.
Save kylebragger/580002 to your computer and use it in GitHub Desktop.
$v = new Validation(
array(
'name' => 'Kyle Bragger',
'age' => 24
)
);
$v->presence('name')->format('name', '/^[a-z ]+$/i')->presence('age');
$this->assertTrue($v->run());
$this->assertEqual($v->errors, array());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment