Skip to content

Commit 428b695

Browse files
Updated the Class import details in the reference.
1 parent b295f65 commit 428b695

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ composer require theriddleofenigma/laravel-model-validation
1414
Here user model is mentioned as an example. You could use this in any model you want.
1515

1616
### User.php model
17-
use CodeDevPal\ValidatorTrait;
17+
use Enigma\ValidatorTrait;
18+
1819
class User extends Model
1920
{
2021
use ValidatorTrait;
2122

2223
/**
23-
* Boot method
24+
* Boot method.
2425
*/
2526
public static function boot()
2627
{
@@ -31,7 +32,7 @@ Here user model is mentioned as an example. You could use this in any model you
3132
}
3233

3334
/**
34-
* Validation rules to validate
35+
* Validation rules to validate.
3536
*
3637
* @return array
3738
*/
@@ -44,7 +45,7 @@ Here user model is mentioned as an example. You could use this in any model you
4445
}
4546

4647
/**
47-
* Custom messages to replace the validation messages
48+
* Custom messages to replace the validation messages.
4849
*
4950
* @return array
5051
*/
@@ -57,7 +58,7 @@ Here user model is mentioned as an example. You could use this in any model you
5758
}
5859

5960
/**
60-
* Custom attribute names to replace the validation attribute name
61+
* Custom attribute names to replace the validation attribute name.
6162
*
6263
* @return array
6364
*/
@@ -69,15 +70,15 @@ Here user model is mentioned as an example. You could use this in any model you
6970
}
7071
7172
/**
72-
* Code to be executed before the validation goes here
73+
* Code to be executed before the validation goes here.
7374
*/
7475
public function beforeValidation()
7576
{
7677
// Some code goes here..
7778
}
7879
7980
/**
80-
* Code to be executed after the validation goes here
81+
* Code to be executed after the validation goes here.
8182
*/
8283
public function afterValidation()
8384
{
@@ -89,7 +90,7 @@ Here user model is mentioned as an example. You could use this in any model you
8990
You could mention the validation only for creating itself or on any model event just add `$model->validate()`.
9091

9192
/**
92-
* Boot method
93+
* Boot method.
9394
*/
9495
public static function boot()
9596
{

0 commit comments

Comments
 (0)