Skip to content

Commit

Permalink
Fixes For Validation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Medboubazine committed Mar 1, 2024
1 parent d609f13 commit 343512a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ composer require chargily/chargily-pay

# Documentation For frameworks

- [Laravel](https://github.com/Chargily/chargily-pay-php/blob/main/docs/frameworks/Laravel.md)

- [Balance](https://github.com/Chargily/chargily-pay-php/blob/main/docs/frameworks/Laravel.md)
7 changes: 4 additions & 3 deletions src/Validation/Api/CheckoutCreateValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ final class CheckoutCreateValidation extends Validation implements ValidationInt
public function rules(): array
{
return [
"success_url" => "required|url",
"collect_shipping_address" => "nullable|boolean",
"locale" => "nullable|min:2|max:2",
"description" => "nullable|min:1",
"customer_id" => "nullable|min:1",
"failure_url" => "nullable|url",
"success_url" => "nullable|url",
"webhook_endpoint" => "nullable|url",
"description" => "nullable|min:1",
"locale" => "nullable|min:2|max:2",
"metadata" => "nullable|array",
];
}
Expand Down
6 changes: 3 additions & 3 deletions src/Validation/Api/CustomerCreateValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ final class CustomerCreateValidation extends Validation implements ValidationInt
public function rules(): array
{
return [
"name" => "required|min:1",
"email" => "required|email",
"phone" => "required|numeric",
"name" => "nullable|min:1",
"email" => "nullable|email",
"phone" => "nullable|numeric",
"address" => "nullable|array",
"address.country" => "nullable|min:2|max:2",
"address.state" => "nullable|min:2",
Expand Down

0 comments on commit 343512a

Please sign in to comment.