-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Paul Robert
committed
Jan 1, 2022
1 parent
a762925
commit ed31cdc
Showing
14 changed files
with
33 additions
and
33 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
Chase/Validator/ExecutionResponse.php → Chase/Helga/ExecutionResponse.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Chase\Validator; | ||
namespace Chase\Helga; | ||
|
||
/** | ||
* Holds the value following a rule evaluation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Chase\Validator; | ||
namespace Chase\Helga; | ||
|
||
use finfo; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
Chase/Validator/Functions/filevalidator.php → Chase/Helga/Functions/filevalidator.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Chase\Validator; | ||
namespace Chase\Helga; | ||
|
||
use finfo; | ||
|
||
|
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
Chase/Validator/Functions/validate.php → Chase/Helga/Functions/validate.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Chase\Validator; | ||
namespace Chase\Helga; | ||
|
||
class RuleParser | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
Chase/Validator/ValidationState.php → Chase/Helga/ValidationState.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Chase\Validator; | ||
namespace Chase\Helga; | ||
|
||
class ValidationState | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# Chase Validator | ||
![github stars](https://img.shields.io/github/stars/phrenotype/validator?style=social) | ||
![packagist stars](https://img.shields.io/packagist/stars/chase/validator) | ||
![license](https://img.shields.io/github/license/phrenotype/validator) | ||
![contributors](https://img.shields.io/github/contributors/phrenotype/validator) | ||
![contributors](https://img.shields.io/github/languages/code-size/phrenotype/validator) | ||
![downloads](https://img.shields.io/packagist/dm/chase/validator) | ||
![github stars](https://img.shields.io/github/stars/phrenotype/helga?style=social) | ||
![packagist stars](https://img.shields.io/packagist/stars/chase/helga) | ||
![license](https://img.shields.io/github/license/phrenotype/helga) | ||
![contributors](https://img.shields.io/github/contributors/phrenotype/helga) | ||
![contributors](https://img.shields.io/github/languages/code-size/phrenotype/helga) | ||
![downloads](https://img.shields.io/packagist/dm/chase/helga) | ||
|
||
This is a library for validation with easy customization of error messages. It validates everything from variables to files. It is not limited to form validation. | ||
|
||
It has a clean and easy syntax with no clutters. Additionally, there are no external dependencies, apart from php, of course :). | ||
|
||
## INSTALL | ||
`composer require chase/validator` | ||
`composer require chase/helga` | ||
|
||
## USAGE | ||
|
||
|
@@ -20,7 +20,7 @@ The most basic use is to validate single values. | |
```php | ||
<?php | ||
|
||
use Chase\Validator\validate; | ||
use Chase\Helga\validate; | ||
|
||
$v = validate("chase")->withRules(['required', 'minLen:5', 'maxLen:10']); | ||
|
||
|
@@ -35,7 +35,7 @@ if($v->passes()){ | |
```php | ||
<?php | ||
|
||
use Chase\Validator\validate; | ||
use Chase\Helga\validate; | ||
|
||
$v = validate("[email protected]")->withRules(['email']); | ||
|
||
|
@@ -50,7 +50,7 @@ For multiple values, pass an associative array like so : | |
```php | ||
<?php | ||
|
||
use Chase\Validator\validate; | ||
use Chase\Helga\validate; | ||
|
||
$values = [ | ||
'name' => '', | ||
|
@@ -92,7 +92,7 @@ By default, it only flattens and returns the first error for each field. Passing | |
```php | ||
<?php | ||
|
||
use Chase\Validator\validate; | ||
use Chase\Helga\validate; | ||
|
||
$values = [ | ||
'name' => 'ab1', | ||
|
@@ -133,7 +133,7 @@ For directives without arguments i.e single directives | |
```php | ||
<?php | ||
|
||
use Chase\Validator\validate; | ||
use Chase\Helga\validate; | ||
|
||
$v = validate("c")->withRules([ | ||
'integer::It must be a number', | ||
|
@@ -148,7 +148,7 @@ For directives with arguments | |
```php | ||
<?php | ||
|
||
use Chase\Validator\validate; | ||
use Chase\Helga\validate; | ||
|
||
$v = validate("c")->withRules([ | ||
'minLen:4:Cannot be less than four', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters