Skip to content

Commit 8fdbd04

Browse files
committed
Some fixes for validation
1 parent 7ffdbb0 commit 8fdbd04

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

event/listener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ public function validate_googleanalytics_id($event)
124124
$input = $event['cfg_array']['googleanalytics_id'];
125125

126126
// Check if the validate test is for google_analytics
127-
if (($event['config_definition']['validate'] == 'googleanalytics_id') && ($input is !== ''))
127+
if (($event['config_definition']['validate'] == 'googleanalytics_id') && ($input !== ''))
128128
{
129129
// Store the error and input event data
130130
$error = $event['error'];
131131

132132
// Add error message if the input is not a valid Google Analytics ID
133-
if (!preg_match('/^ua-\d{4,9}-\d{1,4}$/i', $input))
133+
if (!preg_match('/^UA-\d{4,9}-\d{1,4}$/', $input))
134134
{
135135
$error[] = $this->user->lang('ACP_GOOGLEANALYTICS_ID_INVALID', $input);
136136
}

0 commit comments

Comments
 (0)