Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
add validation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed May 23, 2022
1 parent 83eabd8 commit ee2fa1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Traits/HasMangopayUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ protected function validateNaturalMangopayUser(): bool
return !Validator::make($this->buildMangopayUserData(), [
'Name' => ['required', 'string'],
'Email' => ['required', 'email'],
'UserCategory' => ['required', 'in:Owner,Payer'],
'TermsAndConditionsAccepted' => ['sometimes', 'bool'],
'HeadquartersAddress.AddressLine1' => ['required', 'string'],
'HeadquartersAddress.AddressLine2' => ['nullable', 'string'],
'HeadquartersAddress.City' => ['required', 'string'],
Expand Down Expand Up @@ -363,6 +365,8 @@ protected function validateLegalMangopayUser(): bool
$rules = [
'Name' => ['required', 'string'],
'Email' => ['required', 'email'],
'UserCategory' => ['required', 'in:Owner,Payer'],
'TermsAndConditionsAccepted' => ['sometimes', 'bool'],
'HeadquartersAddress.AddressLine1' => ['required', 'string'],
'HeadquartersAddress.AddressLine2' => ['nullable', 'string'],
'HeadquartersAddress.City' => ['required', 'string'],
Expand Down

0 comments on commit ee2fa1a

Please sign in to comment.