function fieldVerificationFloat(el, x, y){
if (x == undefined) x = '';
if (y == undefined) y = '2';
const allowedCodes = [8, 9, 27, 35, 36, 37, 38, 39, 46, 110, 188];
//const pattern = /^\d+(\.?)\d{0,2}$/g;
const pattern = /^\d{0,6}(\.?)\d{0,2}$/g;
//const pattern = new RegExp(`^\\d{0,${x}}(\\.?)\\d{0,${y}}$`, 'g');
document.getElementById(el).oninput = function(e) {
const value = this.value;
if( !(value.replace(/\s/g, '').match(pattern) || allowedCodes.some(code => code === e.keyCode)) ) this.value = value.slice(0, -1);
}
}