Skip to content
This repository was archived by the owner on Jul 10, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <sh.niakan@anetwork.ir>
* @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