From 76105e277b67cb8c6cd516a355d8ba66f979b04b Mon Sep 17 00:00:00 2001 From: Vance Lucas Date: Tue, 5 Mar 2013 16:26:09 -0600 Subject: [PATCH] Add php code highlighting to code blocks in README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9fab776..c9a104d 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Usage is simple and straightforward. Just supply an array of data you wish to validate, add some rules, and then call `validate()`. If there are any errors, you can call `errors()` to get them. -``` +```php $v = new Valitron\Validator(array('name' => 'Chester Tester')); $v->rule('required', 'name'); if($v->validate()) { @@ -55,7 +55,7 @@ if($v->validate()) { Using this format, you can validate `$_POST` data directly and easily, and can even apply a rule like `required` to an array of fields: -``` +```php $v = new Valitron\Validator($_POST); $v->rule('required', ['name', 'email']); $v->rule('email', 'email'); @@ -101,7 +101,7 @@ name, a custom callback or closure, and a error message to display in case of an error. The callback provided should return boolean true or false. -``` +```php Valitron\Validation::addRule('alwaysFail', function($field, $value, array $params) { return false; }, 'Everything you do is wrong. You fail.');