Source
info(_s('Incorrect value "%1$s" for "%2$s" field: must be between %3$s and %4$s, and have no more than %5$s digits after the decimal point.',
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
function unset_request($key) {
unset($_GET[$key], $_POST[$key], $_REQUEST[$key]);
}
/**
* Validation expression for min/max number range.
*
* @param int $min
* @param int $max
* @param string $var
*
* @return string
*/
function BETWEEN($min, $max, $var = '') {
return '({'.$var.'}>='.$min.'&&{'.$var.'}<='.$max.')&&';
}
/**
* Validation expression for min/max range and max number of digits after the decimal point.
*
* @param int $min
* @param int $max
* @param int $scale
* @param string $var
*
* @return string
*/
function BETWEEN_DBL($min, $max, $scale, $var = '') {
return BETWEEN($min, $max, $var).'(round({'.$var.'},'.$scale.')=={'.$var.'})&&';
}
function IN($array, $var = '') {
if (is_array($array)) {
$array = implode(',', $array);
}
return 'str_in_array({'.$var.'},array('.$array.'))&&';
}
/**
* @deprecated
*/
function HEX($var = null) {
return 'preg_match("/^([a-zA-Z0-9]+)$/",{'.$var.'})&&';
}
function validate_port_list($str) {