1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

[ticket/11538] Add optional switch as argument to hex colour validation

The value of $optional will decide whether an empty string will be
treated as incorrect input or if it is allowed. The optional argument
will default to false and therefore treat an empty string as incorrect
unless explicitly told to not do so.

PHPBB3-11538
This commit is contained in:
Marc Alexander
2013-05-19 17:45:45 +02:00
parent e49b4543de
commit cd1da92d85
3 changed files with 7 additions and 5 deletions

View File

@@ -421,7 +421,7 @@ class acp_groups
*/
$validation_checks = array(
'max_recipients' => array('num', false, 0, 16777215),
'colour' => array('hex_colour'),
'colour' => array('hex_colour', true),
);
if ($validation_error = validate_data($submit_ary, $validation_checks))