Merge #16212 - Fix #16201 - Trim spaces for integer values in table search

Pull-request: #16212
Fix: #16201

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-06-22 08:31:27 +02:00
commit f2fdbd6d28
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -155,6 +155,9 @@ function verifyAfterSearchFieldChange (index) {
var $thisInput = $('input[name=\'criteriaValues[' + index + ']\']');
// validation for integer type
if ($thisInput.data('type') === 'INT') {
// Trim spaces if it's an integer
$thisInput.val($thisInput.val().trim());
var hasMultiple = $thisInput.prop('multiple');
if (hasMultiple) {
$('#tbl_search_form').validate();