|
|
@@ -45,6 +45,7 @@ class User extends Component
|
|
|
$this->password = '';
|
|
|
$this->old_password = '';
|
|
|
$this->group_id = null;
|
|
|
+ $this->resetErrorBag();
|
|
|
}
|
|
|
|
|
|
public function updatingSearch()
|
|
|
@@ -52,6 +53,11 @@ class User extends Component
|
|
|
$this->resetPage();
|
|
|
}
|
|
|
|
|
|
+ public function updatedPassword()
|
|
|
+ {
|
|
|
+ $this->resetErrorBag('password');
|
|
|
+ }
|
|
|
+
|
|
|
public function render()
|
|
|
{
|
|
|
$this->groups = \App\Models\UserGroup::orderBy('name')->get();
|
|
|
@@ -94,6 +100,8 @@ class User extends Component
|
|
|
|
|
|
public function validatePassword()
|
|
|
{
|
|
|
+ $this->resetErrorBag('password');
|
|
|
+
|
|
|
if ($this->add && empty($this->password)) {
|
|
|
$this->addError('password', 'La password è obbligatoria');
|
|
|
return false;
|