1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

fixes for validation

This commit is contained in:
David Bomba 2021-01-13 22:52:30 +11:00
parent e3efa5790f
commit 4ff0108c5c
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ class StoreClientRequest extends Request
//$rules['name'] = 'required|min:1';
$rules['id_number'] = 'unique:clients,id_number,'.$this->id.',id,company_id,'.$this->company_id;
$rules['settings'] = new ValidClientGroupSettingsRule();
$rules['contacts.*.email'] = 'nullable|distinct|email:rfc,dns';
$rules['contacts.*.email'] = 'bail|nullable|distinct|sometimes|email';
$rules['contacts.*.password'] = [
'nullable',
'sometimes',

View File

@ -54,7 +54,7 @@ class UpdateClientRequest extends Request
//$rules['id_number'] = 'unique:clients,id_number,,id,company_id,' . auth()->user()->company()->id;
$rules['id_number'] = 'unique:clients,id_number,'.$this->id.',id,company_id,'.$this->company_id;
$rules['settings'] = new ValidClientGroupSettingsRule();
$rules['contacts.*.email'] = 'nullable|distinct|email:rfc,dns';
$rules['contacts.*.email'] = 'bail|nullable|distinct|sometimes|email';
$rules['contacts.*.password'] = [
'nullable',
'sometimes',