We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d5a840 commit 699a00eCopy full SHA for 699a00e
app/Models/User.php
@@ -2322,12 +2322,8 @@ public function isValid()
2322
if ($countryAcronym === null) {
2323
$this->country_acronym = Country::UNKNOWN;
2324
} elseif ($this->isDirty('country_acronym') && $countryAcronym !== Country::UNKNOWN) {
2325
- $country = app('countries')->byCode($countryAcronym);
2326
- if ($country === null) {
+ if (app('countries')->byCode($countryAcronym) === null) {
2327
$this->validationErrors()->add('country', '.invalid_country');
2328
- } else {
2329
- // ensure matching case
2330
- $this->country_acronym = $country->getKey();
2331
}
2332
2333
0 commit comments