mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-01 00:23:19 +02:00
Small CP interface fixes
This commit is contained in:
parent
b9b9998925
commit
b8975ce9ec
5 changed files with 11 additions and 5 deletions
|
@ -209,7 +209,7 @@ class ContactsController extends Controller
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$normalizedVoice = normalizePhoneNumber($voice, strtoupper($postalInfoIntCc));
|
||||
if (isset($normalizedVoice['error'])) {
|
||||
$this->container->get('flash')->addMessage('error', 'Unable to create contact: ' . $normalizedVoice['error']);
|
||||
|
@ -217,6 +217,12 @@ class ContactsController extends Controller
|
|||
}
|
||||
$voice = $normalizedVoice['success'];
|
||||
|
||||
// Validate length of $voice
|
||||
if (strlen($voice) > 17) {
|
||||
$this->container->get('flash')->addMessage('error', 'Unable to create contact: Phone number exceeds 17 characters');
|
||||
return $response->withHeader('Location', '/contact/create')->withStatus(302);
|
||||
}
|
||||
|
||||
if (!empty($fax)) {
|
||||
$normalizedFax = normalizePhoneNumber($fax, strtoupper($postalInfoIntCc));
|
||||
if (isset($normalizedFax['error'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue