1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/11538] Use regex for testing color value and improve tests

We are now using a regex with preg_match() in order to properly check
if the entered color value is in hex color format or not. A proper
error message is triggered if an incorrect color value is entered and
the prepended '#' is removed if necessary.

PHPBB3-11538
This commit is contained in:
Marc Alexander
2013-05-14 19:44:55 +02:00
parent b7b0b0ccc3
commit a547ba3f9d
3 changed files with 30 additions and 42 deletions

View File

@@ -120,6 +120,7 @@ $lang = array_merge($lang, array(
'CLICK_VIEW_PRIVMSG' => '%sGo to your inbox%s',
'COLLAPSE_VIEW' => 'Collapse view',
'CLOSE_WINDOW' => 'Close window',
'COLOUR_INVALID' => 'The colour value you entered is invalid.',
'COLOUR_SWATCH' => 'Colour swatch',
'COMMA_SEPARATOR' => ', ', // Used in pagination of ACP & prosilver, use localised comma if appropriate, eg: Ideographic or Arabic
'CONFIRM' => 'Confirm',