From 078529a654374e2a8654ac848474bfc441f0217c Mon Sep 17 00:00:00 2001 From: Gustavo Ocanto Date: Sun, 17 Jul 2016 13:31:12 -0500 Subject: [PATCH] update readme --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09005a5..9768dca 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,26 @@ The array driver looks like this: if you do not set the driver within this file, the default one will be used. -# Implementation +# Validate user address using the Laravel validator object + +Now you will be able to use this package to validate the user address information within your validations rules. This is how it would look like: + +```php +$rules = [ + 'address' => 'valid_place' +]; + +$data = [ + 'address' => 'Guacara, Carabobo, Venezuela' +]; + +$v = \Validator::make($data, $rules); +``` + +You will be able to see the implementation on ManagerTest + + +# Use out of the Laravel object To implement the validation within your project, you have to include the Checker object as so: ```php @@ -68,11 +87,15 @@ public function index(Checker $places) ``` -# Illustration +***Output Illustration*** ![example](https://github.com/gocanto/places-validation/blob/dev/src/Examples/google-output.png) +# Inspiration + +The inspiration came from a needed of using the validation within a form request object. I used [Prosper Otemuyiwa](https://github.com/unicodeveloper/laravel-password) package to have a scope of what I had to do. + # Contributing