mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
tab contact - field plz: numberformat validation only for Austria
This commit is contained in:
@@ -157,11 +157,18 @@ class Kontakt extends FHCAPI_Controller
|
||||
{
|
||||
$this->form_validation->set_data(['address.plz' => $_POST['plz']]);
|
||||
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric', [
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
|
||||
]);
|
||||
|
||||
if(isset($_POST['nation']) && $_POST['nation'] == 'A')
|
||||
{
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
|
||||
]);
|
||||
}
|
||||
|
||||
if(isset($_POST['gemeinde']) && isset($_POST['ort']) && isset($_POST['nation']) && $_POST['nation'] == 'A')
|
||||
{
|
||||
$this->form_validation->set_rules('address.plz', 'Postleitzahl', 'callback_validateLocationCombination', [
|
||||
@@ -225,11 +232,18 @@ class Kontakt extends FHCAPI_Controller
|
||||
|
||||
$uid = getAuthUID();
|
||||
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric', [
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
|
||||
]);
|
||||
|
||||
if(isset($_POST['nation']) && $_POST['nation'] == 'A')
|
||||
{
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
|
||||
]);
|
||||
}
|
||||
|
||||
if(isset($_POST['gemeinde']) && isset($_POST['ort']) && isset($_POST['nation']) && $_POST['nation'] == 'A')
|
||||
{
|
||||
$this->form_validation->set_rules('address.plz', 'Postleitzahl', 'callback_validateLocationCombination', [
|
||||
|
||||
@@ -372,7 +372,7 @@ export default{
|
||||
<div class="stv-details-kontakt-address h-100 pt-3">
|
||||
|
||||
<!--Modal: AddressModal-->
|
||||
<bs-modal ref="adressModal">
|
||||
<bs-modal ref="adressModal" dialog-class="modal-dialog-scrollable">
|
||||
<template #title>
|
||||
<p v-if="statusNew" class="fw-bold mt-3">{{$p.t('person', 'adresse_new')}}</p>
|
||||
<p v-else class="fw-bold mt-3">{{$p.t('person', 'adresse_edit')}}</p>
|
||||
|
||||
Reference in New Issue
Block a user