mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 17:07:01 +01:00
Fix minori
This commit is contained in:
parent
7c7b3bf5ec
commit
b39c965210
@ -22,7 +22,7 @@ $id_anagrafica = !empty(get('idanagrafica')) ? get('idanagrafica') : $user['idan
|
||||
<input type="hidden" name="op" value="add">
|
||||
<input type="hidden" name="backto" value="record-edit">
|
||||
<input type="hidden" name="dir" value="<?php echo $dir; ?>">
|
||||
|
||||
|
||||
<!-- Fix creazione da Anagrafica -->
|
||||
<input type="hidden" name="id_record" value="">
|
||||
|
||||
|
@ -44,11 +44,11 @@ switch (post('op')) {
|
||||
|
||||
// Validazione indirizzo email mittente
|
||||
$check_email = Validate::isValidEmail(post('from_address'));
|
||||
|
||||
|
||||
// Controllo sulla validazione
|
||||
if (empty($check_email)) {
|
||||
if (!empty($check_email['valid-format'])) {
|
||||
flash()->info(tr('Sintassi email verificata'));
|
||||
} else if (!$check_email['valid-format']) {
|
||||
} else {
|
||||
flash()->error(tr("Attenzione: l'indirizzo email _EMAIL_ sembra non essere valido", [
|
||||
'_EMAIL_' => post('from_address'),
|
||||
]));
|
||||
|
@ -123,6 +123,8 @@ class Validate
|
||||
public static function isValidEmail($email)
|
||||
{
|
||||
$result = [];
|
||||
$result['valid-format'] = true;
|
||||
|
||||
if (!v::email()->validate($email)) {
|
||||
$result['valid-format'] = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user