update address validation

This commit is contained in:
Julien Fastré 2019-04-02 11:58:24 +02:00
parent 104181ba71
commit 3c6d39dc56
2 changed files with 6 additions and 2 deletions

View File

@ -35,3 +35,7 @@ Version 1.5.5
- Fix bug in accompanying period filter
Branche master
==============
- Update address validation

View File

@ -112,7 +112,7 @@ class PersonAddressController extends Controller
$person->addAddress($address);
if ($form->isSubmitted()) {
if ($form->isSubmitted() && $form->isValid()) {
$validatePersonErrors = $this->validatePerson($person);
if (count($validatePersonErrors) !== 0) {
@ -194,7 +194,7 @@ class PersonAddressController extends Controller
$form = $this->createEditForm($person, $address);
$form->handleRequest($request);
if ($request->getMethod() === 'POST') {
if ($form->isSubmitted() and $form->isValid()) {
$validatePersonErrors = $this->validatePerson($person);
if (count($validatePersonErrors) !== 0) {