Skip to content

Commit

Permalink
Merge pull request #7 from danielebarbaro/hotfix/validation
Browse files Browse the repository at this point in the history
Update add rules for notes and address
  • Loading branch information
danielebarbaro authored Mar 16, 2022
2 parents 8fe0488 + f61e1fc commit 39bf861
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Traits/EntityDetailHydrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public function syncDetail(array $details)
}
}

public function getValidationRules()
public function getValidationRules(): array
{
return $this->rules ?: [
return array_merge([
'is_company' => 'required|boolean',
'status' => 'required|max:20',
'code' => 'required|max:10',
Expand All @@ -50,6 +50,8 @@ public function getValidationRules()
'postal_code' => 'string|max:6',
'city' => 'string|max:30',
'country' => 'string|max:2',
];
'address' => 'string|max:100',
'notes' => 'string',
], $this->rules ?? []);
}
}

0 comments on commit 39bf861

Please sign in to comment.