Skip to content

Commit

Permalink
✨ Make parent_email nullable instead of requiered
Browse files Browse the repository at this point in the history
  • Loading branch information
larasmorningtrain authored and sunenilausen committed May 11, 2022
1 parent dfd8ae4 commit 626fe96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Resources/Api/Backend/Users/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function getFields()
]);
}),

Field::create('parent_email')->validates('required|string|email|different:email|max:255'),
Field::create('parent_email')->validates('nullable|string|email|different:email|max:255'),
Field::create('birthday')->validates('required|date|before:today'),
Field::create('zipcode')
->validates('required|integer|exists:zipcodes,zipcode')
Expand Down
2 changes: 1 addition & 1 deletion app/Resources/Api/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function getFields()
->validates(function (Model $user) {
return $user->hasVerifiedEmail()
? 'in:'.$user->parent_email
: 'required|string|email|different:email|max:255';
: 'nullable|string|email|different:email|max:255';
}),

Field::create('description')->validates('nullable|string'),
Expand Down

0 comments on commit 626fe96

Please sign in to comment.