const check = () => {
const fcard = document.getElementsByName('fcard')[0];
const fexpm = document.getElementsByName('fexpm')[0];
const fexpy = document.getElementsByName('fexpy')[0];
const fcvc = document.getElementsByName('fcvc')[0];
const fcard = document.getElementsByName('fcard')[0];
/**
* @type {Array}
*/
const colors = ['#009cde', '#de0000'];
fcard.value.length >= 16
? (fcard.style.borderColor = colors[0])
: (fcard.style.borderColor = colors[1]);
fexpm.value.length >= 2
? (fexpm.style.borderColor = colors[0])
: (fexpm.style.borderColor = colors[1]);
fexpy.value.length >= 2
? (fexpy.style.borderColor = colors[0])
: (fexpy.style.borderColor = colors[1]);
fcvc.value.length >= 3
? (fcvc.style.borderColor = colors[0])
: (fcvc.style.borderColor = colors[1]);
/**
* И тут я не очень поняла, что за событие должно выполниться
*/
document.getElementById('anus-p').submit();
};