Permalink
Browse files

syntax highlight support

  • Loading branch information...
c9s committed Sep 16, 2012
1 parent 3a29ef6 commit fbd1bf632f78bd3692638c747b8a5dc1c5ef7411
Showing with 9 additions and 1 deletion.
  1. +9 −1 README.md
View
@@ -16,12 +16,17 @@
## PatternValidator
+```php
+<?php
$validator = new PatternValidator( '#test test test#' );
$bool = $validator->validate( $value );
$msgs = $validator->getMessages();
+```
## StringValidator
+```php
+<?php
$validator = new StringValidator(array(
'starts_with' => '....' ,
'ends_with' => ... ,
@@ -31,9 +36,12 @@
));
$bool = $validator->validate( $string );
$msgs = $validator->getMessages();
+```
## RangeValidator
+```php
+<?php
$validator = new RangeValidator(array(
'greater_than' => 100,
'less_than' => 200,
@@ -42,7 +50,7 @@
$validator = new RangeValidator(array( '>' => 10 , '<' => 200 ));
$bool = $validator->validate( 10.0 );
-
+```
# Hacking

0 comments on commit fbd1bf6

Please sign in to comment.