Skip to content

Commit

Permalink
add the List of Predefined Rules in readme as documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
BlakvGhost committed Nov 17, 2023
1 parent a88f257 commit 3cd9fb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ PHPValidator provides a variety of predefined rules that you can use for data va

In addition to the predefined rules, you can create custom validation rules by implementing the `RuleInterface`. Here's an example of how to create and use a custom rule:

### CustomRule.php
### CustomPasswordRule.php

```php
// CustomPasswordRule.php
Expand Down Expand Up @@ -256,7 +256,7 @@ try {
echo "Validation error: " . $e->getMessage();
}
```
In this example, we created a CustomRule that checks if a given value is greater than a specified parameter. You can customize the passes method to implement your specific validation logic.
In this example, we created a CustomRule that checks if the password is equal to confirm_password. You can customize the passes method to implement your specific validation logic.

## Contributing

Expand Down

0 comments on commit 3cd9fb7

Please sign in to comment.