1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-25 06:39:48 +03:00

Fix BETWEEN search does not validate input since there is a space "1, 2" instead of "1,2"

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes
2023-11-12 18:09:19 +01:00
parent f3e714910e
commit 119208b39c

View File

@@ -178,7 +178,7 @@ function verifyAfterSearchFieldChange (index, searchFormId) {
// BETWEEN and NOT BETWEEN
// See all possible syntaxes in tests of https://regexr.com/7h1eq
jQuery.validator.addMethod('validationFunctionForMultipleInt', function (value) {
return value.match(/^(((0x[0-9a-f]+)|([+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)(e[+-]?[0-9]+)?))(,|$))+$/i) !== null;
return value.replace(/ /g,'').match(/^(((0x[0-9a-f]+)|([+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)(e[+-]?[0-9]+)?))(,|$))+$/i) !== null;
},
Messages.strEnterValidNumber
);