Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Commit

Permalink
Merge pull request #45 from anetwork/develop
Browse files Browse the repository at this point in the history
Updated readme file and use App namespace
  • Loading branch information
shahrokhniakan authored Apr 19, 2017
2 parents 2949d09 + cae9e13 commit c0e82d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ Add the following provider to providers part of config/app.php
Anetwork\Validation\PersianValidationServiceProvider::class
```

## vendor:publish
You can run vendor:publish command to have custom lang file of package on this path ( resources/lang/validation )

## Usage

You can access to validation rules by passing the rules key according blew following table:
Expand Down Expand Up @@ -195,6 +198,3 @@ Validator::make( $request->all(), [
]);
```

### vendor:publish
You can run vendor:publish command to have custom lang file of package on this path ( resources/lang/validation )

4 changes: 3 additions & 1 deletion src/ValidationMessages.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace Anetwork\Validation;

use App;

/**
* @author Shahrokh Niakan <[email protected]>
* @since Sep 11, 2016
Expand All @@ -24,7 +26,7 @@ class ValidationMessages
*/
public function __construct() {

$this->lang = \App::getLocale();
$this->lang = App::getLocale();

if(! file_exists(resource_path('lang/validation/' . $this->lang . '.php'))){
$this->config = include __DIR__ . '/../lang/' . $this->lang . '.php';
Expand Down

0 comments on commit c0e82d7

Please sign in to comment.